So I was trying to get into HTML etc and was just playing around and came over this problem: What I want to do is create a header div with the size of 5% height and 100% width and a div on the left that has a height of the remaining 95%.
The div that is supposed to be on the left, works perfectly, but the one above is just empty if I don't add any elements in it, and when I add Elements, the div just gets the height of the element.
I want both Divs to have the size they are suppsoed to have:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>testing</title>
<style type="text/css">
html
{
height: 100%;
}
body
{
height: 100%;
margin: 0 auto;
}
#header
{
height 10%;
width: 100%;
background-color: green;
}
#menu
{
height: 100%;
width: 10%;
background-color: royalblue;
}
a
{
width: 500px;
}
</style>
</head>
<body>
<div id="header">
Hey
</div>
<div id="menu">
</div>
</body>
</html>