toolmania1
New Member
Hello,
I am requesting advice on what to do with my footers. I use absolute positioning on my sites. I also center the first div using left:50%; and margin-left: -475px;
I normally make my site 950 px; wide. So, 1/2 of 950 = 475. That is how I can center my site using a main container div.
I have all of that down and working nicely. However, the footer is my problem. I made an xml file for the client. They can update it when they want. On one of the pages in my site, this xml file is displayed. So, if they edit it, I am afraid that the content could run over top of the footer at the bottom. I use a height in my divs also. So, first off, should I never use a height? I think I had some reasons that I cannot remember right now for using the height.
Regardless, can I mix absolute and relative positioning? I thought that maybe I could tell the footer div to always displays at the bottom 100 px, no matter what. Is that possible? I know and use top like so: "top:10px;". Can this be done with something like "bottom:100px;". Even if the body expanded like its height like in the case where the client edits the xml to be longer than it is right now, I would not have a problem then since the footer would always be the bottom 100px.
Any ideas on how I can use my absolute positioning on the majority of the page but then make the footer be at the bottom x amount of pixels every time? I guess a % would work also, but I get a little nervous about % because I want to control how the page looks ( hence my heavy use of absolute positioning. )
Here is an example of my layout
<div class="container">
<div class = "banner>.....</div>
<div class="body">....</div>
<div class="footer">....</div>
</div> // end the container div
.container
{
position:absolute;
left:50%;
margin-left:-475px;
//other stuff
}
.banner
{
position:absolute;
left:0px;
top:0px;
height:200px;
//other stuff
}
.body
{
position:absolute;
left:0px;
top:200px;
height:500px;
//other stuff
}
.footer
{
position:absolute;
left:0px;
top:700px;
height:100px;
//other stuff
}
So, if the body is larger than 500px in height, I have a problem with the body overlapping the footer content.
Thanks in advance for any help!

I am requesting advice on what to do with my footers. I use absolute positioning on my sites. I also center the first div using left:50%; and margin-left: -475px;
I normally make my site 950 px; wide. So, 1/2 of 950 = 475. That is how I can center my site using a main container div.
I have all of that down and working nicely. However, the footer is my problem. I made an xml file for the client. They can update it when they want. On one of the pages in my site, this xml file is displayed. So, if they edit it, I am afraid that the content could run over top of the footer at the bottom. I use a height in my divs also. So, first off, should I never use a height? I think I had some reasons that I cannot remember right now for using the height.
Regardless, can I mix absolute and relative positioning? I thought that maybe I could tell the footer div to always displays at the bottom 100 px, no matter what. Is that possible? I know and use top like so: "top:10px;". Can this be done with something like "bottom:100px;". Even if the body expanded like its height like in the case where the client edits the xml to be longer than it is right now, I would not have a problem then since the footer would always be the bottom 100px.
Any ideas on how I can use my absolute positioning on the majority of the page but then make the footer be at the bottom x amount of pixels every time? I guess a % would work also, but I get a little nervous about % because I want to control how the page looks ( hence my heavy use of absolute positioning. )
Here is an example of my layout
<div class="container">
<div class = "banner>.....</div>
<div class="body">....</div>
<div class="footer">....</div>
</div> // end the container div
.container
{
position:absolute;
left:50%;
margin-left:-475px;
//other stuff
}
.banner
{
position:absolute;
left:0px;
top:0px;
height:200px;
//other stuff
}
.body
{
position:absolute;
left:0px;
top:200px;
height:500px;
//other stuff
}
.footer
{
position:absolute;
left:0px;
top:700px;
height:100px;
//other stuff
}
So, if the body is larger than 500px in height, I have a problem with the body overlapping the footer content.
Thanks in advance for any help!
Last edited: