Re: opinions on deprecated code plus

> 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 UTC