The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Table will not center in WordPress
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?
Have you tried setting the width to 100% rather than a fixed value?
There is no margin: 0 auto; applied to that table. It’s actually taking the style properties from line 337 in your CSS file:
margin: 0 auto;
.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).
Thank You!!! Both these suggestions were helpful!!!