I'm trying to center my blog in the middle of the screen but i'm not quite sure what I just adjust... I've been messing with the margin in the #wrap but it keeps pushing my blog to the right... Any ideas? You'll see what I mean when you go to my site.. Here is my site. http://www.loansafe.org/you-walk-away-calculator
All you need to do is change the width on body to 100% and its margins to 0px You should also change the margin of #wrap to margin:0px auto; to save 4 characters of space. Although you can leave it at margin: 0px auto 0px; as it does exactly the same thing
you could also specify the width of your main content, so it looks something like this. width: 940px; margin-right: auto; margin-left: auto; Code (markup):
If you want centering in Internet explorer too, do this in addition of the last reply body { text-align: center; } #wrap { text-align: left; }
That only applies for IE6 in quirks mode because it doesn't understand auto. Is that right? Can we drop it if we have a valid doctype to keep IE6 in standards mode?
That is for IE5 and for IE6 in quirks mode. Since IE5 was superseded 9 years ago, and since you should never, ever trigger quirks mode, quit using a buggy, incorrect method. No other browser would be centered by that silliness. cheers, gary