V
V
Valek-web Zir2020-09-24 19:06:25
HTML
Valek-web Zir, 2020-09-24 19:06:25

Why doesn't the div element stretch to its full height?

Why doesn't the div stretch to the full height of div.main?
https://codepen.io/valek-web/pen/WNwYeOJ

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2020-09-24
@valek-web

height:100% for this div, remove
100% will not work, because main also has 100%, and its parent has no height. This means that main does not have a height, which means that the div does not either.
If you use flexes - use flexes, no need to use crutches.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question