W3C home > Mailing lists > Public > www-amaya@w3.org > July to September 2002

Re: Centering tables

From: Jose Carlos Santos <jcsantos@fc.up.pt>
Date: Mon, 30 Sep 2002 14:49:21 +0100 (WET DST)
To: Irene Vatton <irene.vatton@inrialpes.fr>
cc: www-amaya@w3.org
Message-ID: <Pine.OSF.4.40.0209301413100.13436-100000@gtserver.fc.up.pt>

On Mon, 30 Sep 2002, Irene Vatton wrote:

> > I've noticed that when I put
> >
> > TABLE {
> >     margin-left: auto;
> >     margin-right: auto }
> >
> > in a CSS file, the tables do not get centered under Amaya, but they should
> > (and they do under IE and Netscape). Is this a bug or am I missing
> > something?
>
> Hum, CSS is not very clear about that.

I think that it is very clear about this. As you can read in Cascading
Style Sheets, level 2/CSS2 Specification/W3C Recommendation 12-May-1998
(at http://www.w3.org/TR/REC-CSS2/tables.html#q6):
--------------------------------------------------------------------------
The following example shows how to put a caption in the left margin. The
table itself is centered, by setting its left and right margins to 'auto',
and the whole box with table and caption is shifted into the left margin
by the same amount as the width of the caption.

BODY {
    margin-left: 8em
}
TABLE {
    margin-left: auto;
    margin-right: auto
}
---------------------------------------------------------------------------
> I checked that latest Mozilla and Opera versions do not center the table
> like Amaya.

I do not have Opera but I do have the latest version of Mozilla (1.2,
released the 10th September) and it does center the table, as it did the
version 1.0. Besides, the fact that other browsers don't so things as they
should does not justify the same behaviour from Amaya.

Best regards

Jose Carlos Santos
Received on Monday, 30 September 2002 09:50:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:26 UTC