S
S
Sergey Suntsev2020-07-04 20:43:16
css
Sergey Suntsev, 2020-07-04 20:43:16

Why, when laying out a flex block, does the upper indent of the inner block fly off if the display: flex property is removed from the lower block?


Actually there is a code.
If the ul element has display: flex;
Then the indents of the neighboring element fly off, can you tell me what is the reason for this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arseny, 2020-07-05
@GreyCrew

https://developer.mozilla.org/ru/docs/Web/CSS/CSS_... read.
Elements with display: flex ignore these rules.

F
Froggyweb, 2020-07-04
@Froggyweb

because you have a fixed header height. Try never to set the height of the blocks at all. Only in very extreme cases. This is very bad practice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question