Home › Forums › CSS › CSS Sticky Footer Problem › Re: CSS Sticky Footer Problem
January 9, 2013 at 9:51 pm
#120479
hotpink
Member
As @jurotek pointed out, the use of a top margin on the header is causing the footer to be pushed down. A full rewrite would probably be a cleaner approach, however I think your current code can work.
Change from
#header {
margin-top: 30px;
}
To
#header {
padding-top: 30px;
}
Another source of extra spacing is the #footer { margin-top }
The footer height is set to 97px, however there is a 7px border applied to the top. So the computed height is 104px.
Change from
#footer {
…
margin-top: -97px;
…
}
To
#footer {
…
margin-top: -104px;
…
}