Table won't align, want centered (4 posts)

  1. frameitsam
    Posted 2 years ago #

    I have looked at everything with firebug on this page, and cannot find the style that is forcing the table to be left justified. In edit on WordPress it appears to be centered the way I want, but when I view in the browser (Chrome) it is left justified. The text is centered but table is not. What am I not seeing?


  2. Andrew
    Forum moderator
    Posted 2 years ago #

    Read through this article. It explains how to center things on a website.

  3. Cenay
    Posted 2 years ago #

    Quick fix, edit the HTML to look like this:

    <table cellspacing="2" cellpadding="2" border="1" style="border-color: #C50143; border-width: 1px; ; width: 400px; margin: 0 auto;">

    1) Removed the class element from the table.
    2) Added margin: 0 auto; to the style portion.

    margin: 0 auto says, put nothing above (or below) of the table, but calculate and auto center the table.

    Hope this helps.

  4. frameitsam
    Posted 2 years ago #

    You are the best Cenay. THis worked perfectly! And thanks for the super fast reply.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.