Before adding this little code i found online to the css it was aligned left in both firefox and IE, which i do not want, i'd prefer it be centered because it looks like crap on a larger monitor. body { margin:0px auto; padding:0px; text-align:center; } content { margin:0px auto; } Code (markup): after adding that it centers in IE, but still huggin the left side of the screen in firefox... any clue at all?
Did you set a width on anything? It's possible Firefox is able to make a good guess as how wide the thing is, while IE doesn't even try. A width should be set before asking a browser to calculate how much margin to have on each side.
<div id="content">Yo.</div> #content { margin:0 auto; width:600px; } That would be horizontally centered if the browser is rendering the page in standards/almost standards mode. Ignore the text-align. It's 2008. Fuck ie5.x and ie6 quirks.
Aha yes, if the above didn't fix the issue, then likely IE6 is in quirks mode (anything before the doctype, or, no doctype anyway). If "text-align: center" on the body works for centering in IE6, then that's the issue, quirks mode. I should have thought to mention it.