centering page body - applying bg img to <html>

liunx

Guest
Hello,

I'm working on a page with a horizontally centered layout. Usually, I'll use a "wrapper" div with left and right margins set to auto. This works fine, but I was thinking that I may be able to skip the wrapper and utilize the <html> and <body> tags to do the work instead. This would cut down on some markup in the page body.html{background: #333 url("#");}
body {margin:0 auto 0 auto;}My question is: does any version of IEwin have issues with this proceedure? I've tested in the following mac browsers with good results:
IE........5.2.2
Safari....1.0.3
NN........7.2
FF........0.10.1
OP........7.54
I'm aware of IEwin's disability to play nice with CSS :( but, I have no way to test on my own...

Thank you for reading,
-MikeYou are allright with IE6, FF and Opera but older versions of IE must have the extra container to center the contents and the background image must be in the body not the html.Fang,

Thanks for the info...
What if the width was set for <body>, would IEwin < 6 have a problem rendering the body at a set width?

-MikeDoesn't work; you would have to set the 'width' of the body with margin, border or padding (units not auto)
The html only affects the layout in IE6. In older versions the html was not part of the documentThanks again...
 
Back
Top