Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-28-2009, 11:00 PM   PM User | #1
sixrfan
Regular Coder

 
Join Date: Aug 2009
Posts: 395
Thanks: 116
Thanked 0 Times in 0 Posts
sixrfan has a little shameless behaviour in the past
footer centering problems

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...

thanks!
sixrfan is offline   Reply With Quote
Old 10-28-2009, 11:32 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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 -
Code:
#content {
	margin: 0px;
	padding: 5px;
	width: 890px;
	min-height: 415px;	
overflow: auto;
}
Removing the bottom margin also works -
Code:
	
#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 that explains how overflow:auto; clears floats for you.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
sixrfan (10-29-2009)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:09 AM.


Advertisement
Log in to turn off these ads.