View Full Version : footer centering problems

10-29-2009, 12:00 AM
how come the text in my footer div is NOT centered on this page: http://www.anneroselli.com/index1.html, but is on all the rest of the pages of the site: http://www.anneroselli.com/appearances.html, http://www.anneroselli.com/news.html, etc...


10-29-2009, 12:32 AM
Hello sixrfan,
Your float is not cleared and it's margin is extending into your footer and moving your xxx over.
Try clearing the floats like this -

#content {
margin: 0px;
padding: 5px;
width: 890px;
min-height: 415px;
overflow: auto;

Removing the bottom margin also works -

#smile {
background-image: url(pics/anne_smile.jpg);
background-repeat: no-repeat;
clear: left;
float: left;
height: 314px;
margin: 10px 0 0;
padding-right: 5px;
width: 216px;

Removing the bottom margin is just to show you what's going on. The correct way to fix this is to clear your floats.
Have a look at this page (http://www.quirksmode.org/css/clearing.html)that explains how overflow:auto; clears floats for you.