Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Help Centering CSS Footer
Old 02-02-2009, 10:29 PM Help Centering CSS Footer
fwnow's Avatar
Average Talker

Posts: 22
Name: PHP Only
Location: San Diego, CA
Trades: 0
I have the following CSS footer which works fine with Firefox, but not IE 7. I'm trying to center the footer, but it shows on the left side with IE 7:


.footer {
background-color: #CDEB8B;
color: #36393D;
text-align: center;
padding: 15px;
margin: 10px 10px 10px 115px;
font-size: 90%;
clear: left;
width: 745px;
background-position: top center;
}
__________________

Please login or register to view this content. Registration is FREE
fwnow is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-02-2009, 11:12 PM Re: Help Centering CSS Footer
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Are you trying to center the element footer, or the text inside? I'm guessing it has something to do with clear: left;, but I'm not sure. Could we have some html code?

- Steve
stevej is offline
Reply With Quote
View Public Profile
 
Old 02-03-2009, 03:38 AM Re: Help Centering CSS Footer
fwnow's Avatar
Average Talker

Posts: 22
Name: PHP Only
Location: San Diego, CA
Trades: 0
I change the code to the one below, but still look different in EI 7. It looks perfect on Firefox, but on IE7 the footer looks smaller then the main div.

I'm not trying to center the text, but the background. Or the whole footer which is a rectangle.



.footer {
background-color: #CDEB8B;
color: #36393D;
text-align: center;
padding: 15px;
margin-left: auto;
margin-right: auto;
width: 50em;
font-size: 90%;
clear: left;
width: 740px;
}
__________________

Please login or register to view this content. Registration is FREE
fwnow is offline
Reply With Quote
View Public Profile
 
Old 02-03-2009, 11:32 AM Re: Help Centering CSS Footer
stevej's Avatar
Professional Multitasker

Posts: 996
Location: Not positive
Trades: 0
Could I have some HTML code and maybe the CSS of the surrounding elements? I can't really know what the problem is if I can't see how you're using the CSS. But I'm sure it would fix a lot of problems if you used the right DOCTYPE. EDIT: I grabbed a doctype and threw in in with the code. Now it works perfectly with IE7. I used:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Never underestimate the power of a proper doctype!

- Steve

Last edited by stevej; 02-03-2009 at 01:24 PM..
stevej is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help Centering CSS Footer
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.82956 seconds with 12 queries