Based on this post (and others):
Make body have 100% of the browser height
It seems like it's reasonable to do this:
html {
height: 100%;
}
body {
min-height: 100%;
}
in order to stretch the background to the entire viewport. but why is this
different from
html {
height: 100%;
}
body {
height: 100%;
}
?
Compare this:
https://codepen.io/benrhere/pen/bGGBVQy
with this:
https://codepen.io/benrhere/pen/ExxNVGW
Specifically setting an inner div to height:100% seems only to work when we set height=100% on the body, but NOT when we set max-height=100%.