W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2001

Re: opinions on deprecated code plus

From: David Woolley <david@djwhome.demon.co.uk>
Date: Wed, 21 Feb 2001 07:49:44 +0000 (GMT)
Message-Id: <200102210749.f1L7ni423260@djwhome.demon.co.uk>
To: w3c-wai-ig@w3.org
> What is the CCS technique for centering a table over all on a page WITHOUT
> causing text in each cell to be centered?

The block element that defines the "page" (or one within it with no
margins, etc.) should have styles of display: block and 
text-align: center.  All thead, tfoot and tbody elements for the table
should have styles including text-align: <something other than center>
(a selector of "table *" should do this).  The table, itself, should
have a style of display: inline-table.

This is the theoretical position from CSS2, although I don't have
a CSS capable browser on this Linux system, to check it.  Practical
considerations might dictate specifying display: inline before display:
inline-table, and it wouldn't surprise me if some browsers, incorrectly,
centered the table, with default styles (which would not normally be
inline-table).

You should also consider using percentage margins and percentage widths,
which are likely to look rather better when extreme font sizes are used.

Of course, the deprecated state of align is independent of whether or
not you can achieve a particular presentational effect.
Received on Wednesday, 21 February 2001 02:52:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:13:53 GMT