When I set up simple HTML template and add a div to the body. When I set the width to 50% the div is then 50% of the window / body element. When I set the height to 50% nothing happens, and if i had an H1 tag to the div height it just defaults to height of the div to that of the H1 tag.
Is there anyway to use % values to simply make the div 50% of the window height without using vh units, or is the only alternative to either use vh units, or add an absolute height value i.e. 2000px?
Example:
HTML
<div id="wrapper">
<h1>Video Demo</h1>
</div>
CSS
#wrapper {
width: 50%;
height: 50%;
background: #e6e6e6;
display: block;
text-align: center;
}
Any explanation or tips greatly appreciated.
Emily,