I am having problems with displaying 2 floating divs with individual backround colors.
So the top element is my header. Beneath there should be a navigation and a main div.
Both of them have different background colors and the color should be displayed till the end of the page by default (even if the text length between the divs is different).
I made a jsfiddle demo for better explanation. You can click on the nav div and on the main div for displaying more text.
Demo: http://jsfiddle.net/AfRH2/22/
HTML:
<section id="admin_header">
</section>
<section id="admin_main">
<!-- Navigation -->
<nav id="nav">
text
</nav>
<!-- Content -->
<article id="main">
text
</article>
<div style="clear: both"></div>
</section>
CSS:
body {
font-size: 12px;
height: 100%;
}
#admin_header {
position: relative;
height: 100px;
background-color: #000000;
}
#admin_main {
position: relative;
min-height: 100%;
}
#nav {
position: absolute;
width: 160px;
float: left;
top: 0;
left: 0;
margin: 5px 0 0 0;
background-color: #f5f4f2;
}
#main {
position: absolute;
float: left;
top: 0;
right: 0;
left: 160px;
margin: 5px 0 0 0;
padding: 20px;
background-color: #f9f9f9;
}
p { display: none; }