Forum Moderators: not2easy
The structure/layout of the page is as follows:
<div id=container>
<div id=header></div>
<div id=leftbar></div>
<div id=content></div>
<div id=rightbar></div>
<div id=footer></div>
</div>
I'm not sure how to clear, or hide the sidebars when they extend beyond the footer. Any ideas?
Thanks.
Xapti: no reason for using a container, originally i thought it might help with constraining the height. I also tried using clear:both in the footer, with no success (see below).
Here are the pertinent styles I've been tweaking. I'm sure there is a better way to set this up, so any help is greatly appreciated. Oh, and I am using a strict doctype declaration.
#container{
position:absolute;
top:0px;
left:0px;
height:100%;
}#header{
position:relative;
width:800px;
height:150px;
}
#footer{
position:relative;
width:800px;
height:50px;
clear:both; /*? */
}
#leftbar{
background-image:url(repeat_img.jpg);
background-repeat:repeat-y;
position:absolute;
top:150px; /* position below header */
left:0px;
width:150px;
height:100%;
}
#rightbar{
background-image:url(repeat_img.jpg);
background-repeat:repeat-y;
position:absolute;
right:0px;
top:150px;
width:150px;
height:100%;
}
#content{
position:relative;
top:0px;
margin-left:150;
margin-right:150px;
}