Forums

Give help. Get help.

  • # June 2, 2008 at 8:12 pm

    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

    # June 2, 2008 at 9:38 pm

    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)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag