I have a pretty simple layout that looks like this

The code for is this:
<!DOCTYPE html>
<html>
<HEAD>
<LINK href="mystyle.css" title="compact" rel="stylesheet" type="text/css">
</HEAD>
<body>
<div id="wrap">
<div id="header">
<p> Im the header. </p>
</div>
<div id="nav">
<p> Im the nav. </p>
</div>
<div id="sidebar">
<p> sidebar here </p>
<p> sidebar here </p>
<p> sidebar here </p>
<p> sidebar here </p>
<p> sidebar here </p>
<p> sidebar here </p>
<p> sidebar here </p>
<p> sidebar here </p>
<p> sidebar here </p>
</div>
<div id="main">
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
<p> im the main </p>
</div>
<div id="footer">
<p> footer </p>
</div>
</div>
<body>
</html>
Here is the CSS:
#wrap
{
width: 100%;
background-color:blue;
padding: 10px;
}
#header
{
background-color:white;
width: 98%;
float: left;
padding: 10px;
}
#nav
{
background-color:yellow;
padding: 10px;
width:100%;
}
#main
{
width:100%;
background:green;
padding: 10px;
}
#sidebar
{
background-color:pink;
float:right;
float:top;
padding: 10px;
width:20%;
height:100%;
}
#footer
{
background-color:orange;
padding: 10px;
width:100%;
clear:both;
}
Now I just dont know why I cant get the pink are / sidebar to fill all the space vertically, down to the orange footer?
Example: http://jsfiddle.net/s96Tw/
1) append
#sidebarcontent to the#mainelement;2) add
position:relativeto the#mainelement;3) add this extra code to the css file: