MrDoubtFire
05-17-2003, 05:21 PM
Hi all, I will try to be succinct in my explanation, as much as I can.
I code in XHTML1.1 Strict, and have had no major problems doing so for several months now. I start to design a page which appears simple enough, but I have problems with two divs:
<body.....
<div id="div1">
<div id="internal1"></div>
<div id="internal2"></div>
</div>
<div id="div2">
<span id="1"></span>
<span id....
</div>
</body....
Here is the associated CSS:
#div1 {
position: absolute;
width: 600px;
left: 50%;
margin-left: -300px;
margin-bottom: 10px;
top: 125px;
}
#div2 {
position: absolute
left: 50%;
margin-left: -300px;
width: 600px;
margin-top: 100px;
height: 45px;
bottom: 0px;
clear: both;
}
The problem arises here -> in "div1" I have two floating divs, one for content, one for a secondary content. Both display properly, but I do not specify their height, and more likely than not, one will be longer than the other.
"div2" is supposed to be my footer, and I followed previous examples of how to ensure a footer will be at the bottom of the viewport, or the bottom of the page.
The footer however, appears at the bottom of the viewport -OVER- #div1. How can I ensure the footer will always be at the bottom of the page/viewport?
Hope someone can help, thanks!
MrDoubtFire
I code in XHTML1.1 Strict, and have had no major problems doing so for several months now. I start to design a page which appears simple enough, but I have problems with two divs:
<body.....
<div id="div1">
<div id="internal1"></div>
<div id="internal2"></div>
</div>
<div id="div2">
<span id="1"></span>
<span id....
</div>
</body....
Here is the associated CSS:
#div1 {
position: absolute;
width: 600px;
left: 50%;
margin-left: -300px;
margin-bottom: 10px;
top: 125px;
}
#div2 {
position: absolute
left: 50%;
margin-left: -300px;
width: 600px;
margin-top: 100px;
height: 45px;
bottom: 0px;
clear: both;
}
The problem arises here -> in "div1" I have two floating divs, one for content, one for a secondary content. Both display properly, but I do not specify their height, and more likely than not, one will be longer than the other.
"div2" is supposed to be my footer, and I followed previous examples of how to ensure a footer will be at the bottom of the viewport, or the bottom of the page.
The footer however, appears at the bottom of the viewport -OVER- #div1. How can I ensure the footer will always be at the bottom of the page/viewport?
Hope someone can help, thanks!
MrDoubtFire