Answer the question
In order to leave comments, you need to log in
Should I give each block display: flex;?
I want to build a new landing page template. As you know, it basically goes block by block from top to bottom.
I started with
.container {
max-width: 1000px;
display: flex;
flex-direction: column;
margin: auto;
}
Answer the question
In order to leave comments, you need to log in
For alignment, there are justify-content and align-items properties.
For child elements, flex-grow, align-self, order are used.
You only need to assign flex to a child block when it will itself be a flex container.
>If I need to align the logo and menu to flex I give header display: flex; ?
This is not understood. And for the last two questions - yes, plus justify-content and align-items.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question