Reply
mIE will not center my site
Old 06-10-2006, 04:21 AM mIE will not center my site
Moldarin's Avatar
Extreme Talker

Latest Blog Post:
Keyword Density and Title Tags
Posts: 200
Hi,

I have had problems centering my Website in Microsoft Internet Explorer 6 .

And I cannot understand why it do not work. It used to work, but then I updated a lot of the CSS implementation on the site. After I did that I did not check the site in mIE6.

And my eyes have grown tired in finding the bug. So could a fresh pair of eyes try and help me fix The Web Design Journal for Internet Explorer?
__________________
I do not share ad revenue.
Moldarin is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-10-2006, 05:38 AM Re: mIE will not center my site
Average Talker

Posts: 15
I haven't looked through your HTMl or CSS but if you have a text-align:center; on the main DIV then you will need to add
Code:
margin:auto;
as well.

Last edited by Paul_F : 06-10-2006 at 05:40 AM.
Paul_F is offline
Reply With Quote
View Public Profile Visit Paul_F's homepage!
 
Old 06-10-2006, 05:56 AM Re: mIE will not center my site
Moldarin's Avatar
Extreme Talker

Latest Blog Post:
Keyword Density and Title Tags
Posts: 200
Code:
.content {
width:720px;
margin:18px auto 0 auto;
border-top:1px solid #9ab5c9;
}
__________________
I do not share ad revenue.
Moldarin is offline
Reply With Quote
View Public Profile
 
Old 06-10-2006, 06:55 AM Re: mIE will not center my site
Average Talker

Posts: 15
So if you add: text-align:center;

Does that solve it?

I SEO'd a website a few weeks ago then might help: http://www.shakim.co.uk/. The CSS is styles.css in top level.
Paul_F is offline
Reply With Quote
View Public Profile Visit Paul_F's homepage!
 
Old 06-10-2006, 10:00 AM Re: mIE will not center my site
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Beginning Ajax with PHP
Posts: 168
Location: MS
margin: auto doesn't work in IE. You need to add

body {
text-align: center;
}

in your wrapper div whatever the name is

.content {
text-align: left;
}

The latter will correct centered text.
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 06-10-2006, 04:22 PM Re: mIE will not center my site
vangogh's Avatar
Post Impressionist

Posts: 8,923
Name: Steven Bradley
Location: Boulder, Colorado
margin: auto works with IE. You just need to use a proper doctype.

Moldarin I think the first line in your source <xml...> is what's throwing IE off. Try taking that out and see if it centers.
__________________
l Search Engine Friendly Web Design | Van SEO Design
l Tips On Marketing, SEO, Design, and Development | TheVanBlog
l Custom WordPress Themes
| Small Business Forum
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 06-10-2006, 05:48 PM Re: mIE will not center my site
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Beginning Ajax with PHP
Posts: 168
Location: MS
What doctype is that, I've never been able to make it work?
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 06-10-2006, 07:02 PM Re: mIE will not center my site
chrishirst's Avatar
Super Moderator

Latest Blog Post:
Am I impressed or what?
Posts: 14,864
Location: Blackpool. UK
any full doctype (with URL) will set IE into standards mode BUT including the xml declaration ( <?xml version="1.0" encoding="UTF-8"?> ) will cause IE to revert to "quirks" mode.

There is a chart at http://hsivonen.iki.fi/doctype/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-10-2006, 11:28 PM Re: mIE will not center my site
LadynRed's Avatar
Super Moderator

Posts: 6,699
Location: Tennessee
Yes, and with XHTML if you have ANYTHING before the DOCTYPE line, it will throw IE into Quirks mode
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-11-2006, 05:09 AM Re: mIE will not center my site
chrishirst's Avatar
Super Moderator

Latest Blog Post:
Am I impressed or what?
Posts: 14,864
Location: Blackpool. UK
maybe just qualify that a little for the programmers.

... if you have ANYTHING that displays as text in the output to the browser before the DOCTYPE line ...

programming code that sets the page up (recordsets, variables etc) will NOT cause this to occur.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-12-2006, 07:39 PM Re: mIE will not center my site
Moldarin's Avatar
Extreme Talker

Latest Blog Post:
Keyword Density and Title Tags
Posts: 200
OK, it works on the main page and subpages now.

But not on the forum pages...
__________________
I do not share ad revenue.
Moldarin is offline
Reply With Quote
View Public Profile
 
Old 06-12-2006, 07:49 PM Re: mIE will not center my site
chrishirst's Avatar
Super Moderator

Latest Blog Post:
Am I impressed or what?
Posts: 14,864
Location: Blackpool. UK
not a full doctype on the forum page
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to mIE will not center my site
 

Thread Tools

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

vB 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.17230 seconds with 12 queries