...

View Full Version : Bad footer



jo9100
12-18-2006, 02:14 AM
hello, my footer is stuck in the up of the page while i want it down and within the frame.

see rowik.net (http://rowik.net) for page
see here (http://rowik.net/_style.css) for stylesheet

thanks

_Aerospace_Eng_
12-18-2006, 05:24 AM
Try this

html {
height:100%;
}

body {
margin:0;
font-family:"Trebuchet MS";
background-image:url(/img/back.gif);
/*background-color: #009;*/
background-repeat:repeat;
color:#009;
padding:0;
height:100%;
}

#adsense {
width:125px;
float:right;
margin:1em;
}

a {
color:#006;
}

a:hover {
color:#F90;
text-decoration:none;
}

.titre {
font-size:20px;
}

.fauxlien {
display:none;
color:#666;
text-decoration:underline;
}

#frame {
width:800px;
background-color:#FFF;
margin:auto;
border:#006 solid;
border-width:0 5px;
min-height:100%;
position:relative;
}

#contenu {
padding:1em 2em;
margin:0 165px 0 0;
}

#footer {
border-top:#006 2px solid;
padding:0.5em 0;
background-color:#cdf;
position:absolute;
width:100%;
text-align:center;
bottom:0;
left:0;
}
To learn more read this: http://bonrouge.com/2c-hf-fixed.php

You will need to add a bottom padding to your content equal to or greater than the height of your footer.

jo9100
12-18-2006, 06:18 AM
works perfect! i dont understand nothing but it works! thanks a lot :thumbsup:

_Aerospace_Eng_
12-18-2006, 06:23 AM
I didn't change much. I just made the html and body a height of 100%. I put a min-height which reminds you will need to add

* html #frame {
height:100%;
}
to your CSS so it works in IE as well.

I made #frame position:relative so #footer would be centered, then I used absolute positioning on the footer.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum