I don\'t understand how height percentages work.
Why is the following snippet not filled with color?
You have to set the html's height as well.
html
height
html, body { height: 100%; margin: 0; } #div1 { height: 20%; background-color: red; } #div2 { height: 80%; background-color: blue; }