A CSS/XHTML Strict questions for centering an object

J

Jeremy Brown

Hello all,
I am moving my site over to Strict. I have eliminated almost all of the
depriciated tags and stopped using a table to format the site.

How would I center a table on the page. I have tried with class="center" in
the table tag, but it didn't work. I defined it in my CSS for the site, but
it seems to only work in cells or <p> statements.

http://jerem43.home.att.net/saab.css

Jeremy
 
I

ironcorona

Jeremy said:
How would I center a table on the page. I have tried with class="center" in
the table tag, but it didn't work. I defined it in my CSS for the site, but
it seems to only work in cells or <p> statements.

In .center take out text-align:center; and change it to
..center {margin-left:auto; margin-right:auto;}
or if you don't need a margin on top
..center {margin:0 auto;}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top