8
I believe this solves your problem. The height percentage can only be obtained if it is relative to the other elements that contain these divisions. You have to determine how the upper blocks should behave in relation to the height.
html,
body {
height: 100%;
margin: 0px;
padding: 0px;
}
#dv1 {
width : 100%;
height : 50%;
background-color : red;
}
#dv2 {
width : 100%;
height : 50%;
background-color : green;
}
<div id="dv1"></div>
<div id="dv2"></div>
I already realized what the problem was. The problem was that I had given no value to html and body, the div’s "parents"
– msm.oliveira