Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

body { margin:0; text-align:left }

Status
Not open for further replies.

mickywall

Programmer
Sep 2, 2002
88
0
0
GB
If I put this in an external sytlesheet
body { margin:0; text-align:left; }
the text in my tables in IE center.

If I include
td { text-align:left; } the text doesn't center

Is there any reason for this, surely using the body selector should just work?

thanks,
 
You are correct that the body stylesheet should just work. However, if there is a style deeper down in the hierarchy that contradicts the body's text-align, then the deeper attribute takes precedence. This is undoubtedly what's happening, as left justified is the default, so you shouldn't need the body style anyway.

Post your code if you can't find the problematic style / html.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top