You need a width in there. 

Another CSS Rule

Everything needs to be 100% of the parent, in any case where stuff isn't
defined, CSS will always make margin-right large enough to accommodate 100%
of the parent.  In this case the parent is html.
If using auto, then whatever the difference is will be split between margin
left and margin right. Providing that is, that width is declared.

body{ 
  width: 80%;
  margin: 0 auto;
}
Also equivalent

body{
 width: 80%;
 margin: 0 10%;
}


Sandra Clark
==============================
http://www.shayna.com
Training in Cascading Style Sheets and Accessibility


-----Original Message-----
From: Matt Quackenbush [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 11, 2006 2:36 PM
To: CF-Talk
Subject: OT: CSS Horizontal Centering in IE7

Well, I'm finally getting around to see what all IE7 has "broken" in my
various CSS websites.  I was rather surprised to find out that horizontal
centering is on the list.  For instance, the following does not render
properly in IE7:

body {
   margin: 0 auto;
}

While that *should* have no top/bottom margin, and the body centered on the
screen, in IE7 it is now aligned left.  I've searched around google to see
if I could find any articles regarding this, but have yet to do so.  So, if
you've run across this and have already found/figured out what IE7 wants to
see in order to behave properly, can you please post it?  I'm sure there are
quite a few people (myself included) who would be most appreciative!


Thanks,

Matt




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263576
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to