I am setting the html font size to a viewport width unit. Then I am setting the height of a div with rem units. When you hit different viewport widths the height of the elements are not the same even though the rem unit is the same.
Example:
html{
font-size: 1.3vw;
}
div{
margin: 10px;
width: 100px;
height: 0.2rem;
background: red;
}
<div></div>
<div></div>
If you resize the window in the above snippet you can see that the height of the div's vary when you resize window even though they should remain the same height. Why is this happening?