Title: Cannot Center Table
Last modified: August 19, 2016

---

# Cannot Center Table

 *  [selfmade64856](https://wordpress.org/support/users/selfmade64856/)
 * (@selfmade64856)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/cannot-center-table/)
 * Hello All,
 * I can get the table to align left and to align right, however when it comes to
   align center it only aligns left.
 * Does anyone know the cause of this? It happens in all editors such as tinymce
   and fckeditor.
 * Here is the page that I attempted to center the table:
    [http://sitesires.com/table-test/](http://sitesires.com/table-test/)
 * Thanks!

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/cannot-center-table/#post-1384175)
 *     ```
       table.foobar {
       margin:0 auto;
       width:200px;
       }
       ```
   
 *  [jeremyhelm](https://wordpress.org/support/users/jeremyhelm/)
 * (@jeremyhelm)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/cannot-center-table/#post-1384532)
 * esmi, I’m guessing you’ve answer the question here, but I’m not able to conjure
   the context I guess I need to benefit from it :/
    is this code example for css?
 * how would I place it in relation to the following table?
 *     ```
       <table border="0" width=>
         <tr>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
         </tr>
       </table>
       ```
   
 * thanks for your patience! I duhno;)
 *  Thread Starter [selfmade64856](https://wordpress.org/support/users/selfmade64856/)
 * (@selfmade64856)
 * [16 years ago](https://wordpress.org/support/topic/cannot-center-table/#post-1384561)
 * esmi – sorry for taking so long to get back, your solution worked like a charm.
 * jeremyhelm – In case you haven’t figured it out yet which I’m sure you have, 
   I simply added the css to the bottom of my stylesheet and saved it. All tables
   now have the ability to center for that theme.
 * Thank you so much :)!
 *  [c_wayne](https://wordpress.org/support/users/c_wayne/)
 * (@c_wayne)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/cannot-center-table/#post-1384588)
 * After a lot of trial and error and the lead from esmi above, I found that I could
   center a table with this as the beginning of the table code:
 * > <table style=”width: 480px; margin: 1px auto;” align=”center”>
 * (The key was the “margin: auto” setting. In my case I also wanted a 1px margin.)
 * Hope this helps others.

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

The topic ‘Cannot Center Table’ is closed to new replies.

 * 4 replies
 * 4 participants
 * Last reply from: [c_wayne](https://wordpress.org/support/users/c_wayne/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/cannot-center-table/#post-1384588)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
