Forced centering in IE
# July 23, 2008 at 12:07 pm"box" wrote:Use a strict doctype – a transitional doctype forces IE6 into quirks mode and the margin:0 auto; is unrecognised. In strict (standards mode) your site should centre without problems.
You were write . I changed the doctype and my problem is now fixed. Thanks.# July 25, 2008 at 2:20 pm
This reply has been reported for inappropriate content."Edwin" wrote:I think that’s maybe a better way to do it.
Why? It isn’t necessary. All you end up doing is adding unnecessary extra CSS and in some cases having to add an extra div to your HTML as a page wrap. Not all layouts require a separate wrapper div in addition to the body element.# July 27, 2008 at 12:20 pm
This reply has been reported for inappropriate content.
Using text-align:center; to force a web page to centre is a hack in my view and certainly not necessary for IE6 or later. For eariler IE’s (for anyone suicidal enough to still build for them) then indeed you’ll use the text-align:center; hack to centre your site via a conditional stylesheet. But really, anyone still using IE5.5 or earlier to browse the web will be well used to broken web sites ;) and the worst that would happen in those very old browsers is that the site will be left aligned, so still otherwise fully functional.
You must be logged in to reply to this topic.