The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS centering tables in XHTML

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #22738

    did a Google serach on how to center a table in XHTML.

    the HTML code "align=center" does not validate in XHTML, it works but does not validate.

    found suggestion that you code "table {margin: 0 auto; text-align: center;}". tried this, and it
    validates in XHTML. found you did not need the "text-align: center" though.



    I think the standard is to creat a "wrapper" div. some people call them wrapper and others call them page-wrapper. but the idea is to surround all your content like so

    <div id="wrapper">
    Your site content here.

    </div><!–END wrapper div–>

    then you can make a style sheet for your site


    margin:0 auto;

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.