W3C home > Mailing lists > Public > www-html@w3.org > November 1999

Re: margin auto

From: Tantek Celik <tantek@cs.stanford.edu>
Date: Mon, 22 Nov 1999 10:26:40 -0800
To: Marc Woosnam <marc.woosnam@technocom.net>, Daniel.Mann@smed.com, www-html@w3.org
Message-ID: <1268827286-654044983@psdbay.com>
>From: "Marc Woosnam" <marc.woosnam@technocom.net>
>To: <Daniel.Mann@smed.com>, <www-html@w3.org>
>Subject: Re: margin auto
>Date: Mon, Nov 22, 1999, 9:29 AM
>
> I believe the "auto" value auto sizes the table, as in if there is no set
> width or height it sets them relative to the contents of the table

That is true for width:auto and height:auto.

> From: <Daniel.Mann@smed.com>
> To: <www-html@w3.org>
> Sent: Monday, November 22, 1999 5:12 PM
> Subject: margin auto
>
>
>>
>>
>> I tried the following suggested code to center a table but it didn't
>> center.
>>
>> table { margin-left: auto; margin-right: auto }

As far as margin-left: auto; margin-right: auto not centering the table, I
recommend you check Eric Meyer's excellent MasterGrid CSS property browser
support chart:

http://www.webreview.com/guides/style/mastergrid.html

And if it doesn't work in the browser you are using - report a bug to the
vendor.

>> I'm unclear what the "auto" value does?
>>
>> Can someone help?

The 'auto' value does different things for different properties.

And even on the same property, it has different effects depending on the
value of the display property of an element. E.g. for margins:

http://www.w3.org/TR/REC-CSS2/visudet.html#Computing_widths_and_margins


I recommend that follow-ups be sent to www-style@w3.org as that is probably
a more appropriate forum for CSS related questions.


Tantek
Received on Monday, 22 November 1999 13:27:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:40 GMT