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</td>
<td data-th=”Header2″>Link2</td>
<td data-th=”Header3″>Link3</td>
</tr>
<tr>
<td data-th=”Header1″>Link4</td>
<td data-th=”Header2″>Link5</td>
<td data-th=”Header3″>Link6</td>
</tr>
<tr>
<td data-th=”Header1″>Link7</td>
<td data-th=”Header2″>Link8</td>
<td data-th=”Header3″>Link9</td>
</tr>
</tbody>
</table>Is there any reason why the centering doesn’t work in WordPress?
Any help would be much appreciated….
Thanks!
- The topic ‘CSS Margin Problems’ is closed to new replies.