Sent by Jon Jensen on 10 November 2003 13:01
> I noticed that some browser i.e. mozilla didn't render
> body{text-align:center;} correctly even with margin-top: 0px; instead of
> margin: 0px; change (in an attempt to free content from left or right
margin
> to no avail.)
> http://devbox.shellshark.net/~scottham/index.html
Scott,
As it turns out, Mozilla actually is displaying it correctly. IE is the one
with the problem. text-align is intended to be used with inline elements,
not block-level (such as your divs), but IE applies this to just about
everything. What you want to use is something like this:
body{
margin: 0px auto;
}
That will make your left and right margins automatically take up as much
space as possible, effectively centering your content. IE does not do tis
properly, so you may want to leave in the text-align as well.
Note: If for some reason this doesn't work as outlined above, you may need
to apply "margin: 0px auto;" to one of your nested divs instead of the body.
Jon
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/