You made some mistakes,
- you use
#header
in css but you don't put id header to the<header>
tag, - you use
#nav
in css instead of nav tag because there is no id innav
tag, #header
height is 100%. it will take the height of parent. putheight:auto;
so that it will take only the height it need to fit its content.
I made a JSFiddle. please check. hope this will solve your problem.