Re: how to center a table

On Thu, Apr 21, 2005 at 04:13:42PM -0400, Fellowship Bible Church wrote:
 
> I am using CSS and I would like to center a table.

http://dorward.me.uk/www/centre/#block

> I put <p class="center"> before my table and </p> after the closing
> table tag The validator didn't like this - it thought I was using a
> closing </p> tag for an element never opened.

In HTML, you can not place a table inside a paragraph, and end tags
are optional for paragraphs. So the start of the table implies the end
of the paragraph, so when you try to close it after the table there is
no longer an open paragraph to close.

-- 
David Dorward                                      http://dorward.me.uk

Received on Thursday, 21 April 2005 20:35:52 UTC