W3C home > Mailing lists > Public > www-validator@w3.org > April 2002

Centring Tables in HTML 4.01 Strict...?

From: Charles Walker <cewalker@kingston.net>
Date: Sun, 21 Apr 2002 16:46:15 -0400
To: "'www-validator@w3.org'" <www-validator@w3.org>
Message-Id: <84MGZUON3NM2WHEKJUPQMPROC0JH1Y.3cc32517@charlie>
Hi,

I've got a question that has been bothering me for a while now.  The HTML 4.01 Strict specifications have declared the "align" attribute of the 
<table> tag as deprecated.  HOW are we supposed to centre a table in the browser window? I've tried everything I can think of, with no real 
solution.  For instance, the following CSS declaration produces only partial results; the browsers that I would expect to support it, don't:

body { text-align:center }

The results:

IE 5.5: centres the table
Netscape 4.77: centres the table
Netscape 6.2: table remains left-aligned; individual cell contents are centred
Opera 6.02: table remains left-aligned

Perhaps I'm missing the obvious.  Any help would be appreciated!

Charlie Walker
Received on Sunday, 21 April 2002 16:46:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:03 GMT