First you have to have a DTD. IE won't do CSS centering without it.
Then you need to have a width. Without a width, it can't calculate
what the margins need to be.

width: 100px;
margin-left: auto;
margin-right: auto;

It doesn't have to be a fixed width. It could be percents or any other
unit. If you don't want to use a specific width, there's actually a
neat trick that should work (that unfortunately only applies to
tables).

width: auto;
margin-left: auto;
margin-right: auto;

-Kevin

On 6/21/05, Raymond Camden <[EMAIL PROTECTED]> wrote:
> For some reason, this simple CSS can be applied to a table and it will
> center just fine in firefox, but not IE. Any ideas why?
> 
> margin-left: auto;
> margin-right: auto;
> 
> --
> =======================================================================
> Raymond Camden, Director of Development for Mindseye, Inc (www.mindseye.com)
> 
> Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)
> 
> Email    : [EMAIL PROTECTED]
> Blog     : ray.camdenfamily.com
> Yahoo IM : cfjedimaster
> 
> "My ally is the Force, and a powerful ally it is." - Yoda
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
 Save $10 Download ZoneAlarm Security Suite 
http://www.houseoffusion.com/banners/view.cfm?bannerid=66

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:161506
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to