I have any issue with flexbox, regarding the flex-grow property.
So, I have a navbar and I would like that the first flexbox item would grow twice the size of the other children elements. Now, it doesn’t seem to work with flex-grow.
nav > header {
margin: auto auto;
padding: 0px 0px 0px 0px;
background-color: red;
flex-grow: 2;
}
Do you just want the header to take up the full width of the nav container?
You have left/right padding on the nav you have also centered the content align-items: center.
You might create a container for the paragraph elements (which really should just be links, set to display: block instead) and move the left/right padding from the nav to that container.
You can also just overflow the padding on the nav, although that isn’t really the best way of doing it. But here is an example anyway.
Thanks for pointing that out. Why wasn’t obvious. I’m not seeing the woods because of the tree. Ok, got your solution, tomorrow applying it. Thanks again.
slightly off topic, instead of using header tag, it might be more appropriate to use a heading one(h1, h2…). Header in html, is more to represent the top element of your page, which can contain various stuff, like logo, title(not to be confused with <title>), and even your navigation bar.
Imo, a more correct hierarchy of your tags would be:
You could even use a list (<ul> for example) to put your navigation links, altho it makes it slightly more complicated to navigate in the CSS rules and will also require additional styling