Cool article, I´ve bumped into this problem at least once a year. I´m never happy with the solution that work, but in the end I´m happy to have anything that works.
And I still don´t understand why min-height:100% on the
element does not work (given that html is indeed 100% height).
Cool article, I´ve bumped into this problem at least once a year. I´m never happy with the solution that work, but in the end I´m happy to have anything that works.
And I still don´t understand why
element does not work (given that html is indeed 100% height).min-height:100%
on thethanks for the article.
Came here for the solution, stayed to necropost. 😏
The reason 100% doesn't work is because % is a VERY relative measurement. 100% of what?
If your hero image is nested at all then 100% refers to the parent container's height.
VH & VW are absolute measures. X/100ths of the viewport height or width. Period.
Make sense?