Title: CSS Margin Problems
Last modified: August 24, 2016

---

# CSS Margin Problems

 *  Resolved [canu](https://wordpress.org/support/users/canu/)
 * (@canu)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/)
 * Hi, I’m trying to center align a table in the footer of a website without any
   success.
 * The following code is an example of the code that is being used:
 * CSS
 * .new-table, th, td {
    background-color: #000000; color: #ffffff; }
 * .new-table {
    margin-left: auto; margin-right: auto; }
 * HTML
 * <table class=”new-table”>
    <tbody> <tr> <th>Header1</th> <th>Header2</th> <th
   >Header3</th> </tr> <tr> <td data-th=”Header1″>[Link1](https://www.website1.com)
   </td> <td data-th=”Header2″>[Link2](https://www.website2.com)</td> <td data-th
   =”Header3″>[Link3](https://www.website3.com)</td> </tr> <tr> <td data-th=”Header1″
   >[Link4](https://www.website4.com)</td> <td data-th=”Header2″>[Link5](https://www.website5.com)
   </td> <td data-th=”Header3″>[Link6](https://www.website6.com)</td> </tr> <tr>
   <td data-th=”Header1″>[Link7](https://www.website7.com)</td> <td data-th=”Header2″
   >[Link8](https://www.website8.com)</td> <td data-th=”Header3″>[Link9](https://www.website9.com)
   </td> </tr> </tbody> </table>
 * Is there any reason why the centering doesn’t work in WordPress?
 * Any help would be much appreciated….
 * Thanks!

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

 *  [Tahoerock](https://wordpress.org/support/users/tahoerock/)
 * (@tahoerock)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168200)
 * Hi canu
    Can you provide URL of the web??? Have to take a look on life site. 
   Thanks Tahoerock
 *  Thread Starter [canu](https://wordpress.org/support/users/canu/)
 * (@canu)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168224)
 * Hi Tahoe Rock,
 * The live site is at [https://www.islandlivingantigua.com/](https://www.islandlivingantigua.com/)
   and the table is in the footer area of the page.
 * Thanks!
 *  [Tahoerock](https://wordpress.org/support/users/tahoerock/)
 * (@tahoerock)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168235)
 * Hi
    put this code to your child theme css
 *     ```
       .rwd-table, th, td {
         text-align: center;
       }
       ```
   
 * [SCREENSHOT](https://dl.dropboxusercontent.com/u/41444845/Screen%20Shot%202015-05-26%20at%2015.49.33.png)
 * Here is how it looks like when I do it here
    I hope that it is what you were 
   looking for Feel free to ask Cheers Tahoerock
 *  Thread Starter [canu](https://wordpress.org/support/users/canu/)
 * (@canu)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168297)
 * Hi Tahoe Rock,
 * The center alignment of the table is fine but we would like to have the text 
   in the table to remain left aligned if at all possible.
    I’ve also put this out
   on a WordPress forum as well just in case there is something different about 
   applying this code on a WordPress website.
 * Regards,
    canu
 *  [Tahoerock](https://wordpress.org/support/users/tahoerock/)
 * (@tahoerock)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168315)
 * Hi canu
    Im not sure what you want. So here is second suggestion Hoping I fitted
   your taste. 🙂
 * Change padding-left to any **No. px** you would like to
 * I increased left padding to 61px and it is almost in the centre
 *     ```
       .rwd-table, th, td {
         padding-left: 61px;
       }
       ```
   
 * [Here is a GIF link](http://g.recordit.co/sj19pYedYw.gif)
    So you can see how
   the tables are moved with left padding.
 * Cheers
    TahoeRock
 *  Thread Starter [canu](https://wordpress.org/support/users/canu/)
 * (@canu)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168347)
 * Hi Tahoe Rock,
    Thanks for your time. I’d like the table to be centered in the
   page but the text in the table to be left aligned. I hope that makes sense! Unfortunately
   the GIF link that you’ve given me comes up with the message 403 Forbidden, am
   I doing something wrong?
 * Thanks,
    canu
 *  [Tahoerock](https://wordpress.org/support/users/tahoerock/)
 * (@tahoerock)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168348)
 * Yea you are right:
    GIF is gone, I accidentally deleted it on my site.
 * [So here is a new GIF](http://recordit.co/YGlhNBMmsK)
 *  Thread Starter [canu](https://wordpress.org/support/users/canu/)
 * (@canu)
 * [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168427)
 * Thanks Tahoe Rock, much appreciated!

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

The topic ‘CSS Margin Problems’ is closed to new replies.

## Tags

 * [align](https://wordpress.org/support/topic-tag/align/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [table](https://wordpress.org/support/topic-tag/table/)

 * 8 replies
 * 2 participants
 * Last reply from: [canu](https://wordpress.org/support/users/canu/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/css-margin-problems/#post-6168427)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
