Forums

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
    Posts
  • #22738
    al_m473
    Participant

    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.

    Al

    #47725
    cybershot
    Participant

    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

    <html>
    <head>
    </head>
    <body>
    <div id="wrapper">
    Your site content here.

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

    then you can make a style sheet for your site

    #wrapper
    {

    margin:0 auto;
    }

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