Grow your CSS skills. Land your dream job.

Table will not center in WordPress

  • # May 9, 2012 at 10:24 am

    Why won’t this table in WordPress center?
    I’ve tried
    align=center
    margin: 0 auto

    both inline and through the stylesheet…nothing??

    http://www.revannielawrence.com/?page_id=112

    Also is there a simple plug-in for tables that allows for photos and lots of CSS control?

    # May 9, 2012 at 10:53 am

    Have you tried setting the width to 100% rather than a fixed value?

    # May 9, 2012 at 11:20 am

    There is no margin: 0 auto; applied to that table. It’s actually taking the style properties from line 337 in your CSS file:

    .post_content ul, .post_content ol, .post_content table, .post_content dl { margin: 1.5em 0; }

    Either give the table itself margin: 0 auto;, or give the DIV that contains the table the same width as the table (550px).

    # May 9, 2012 at 11:26 am

    Thank You!!! Both these suggestions were helpful!!!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".