globalnerds |
Sep 22, 2010 03:13 PM |
Centering a table
I am using wordpress version 2.9.2 Atahualpa 3.5.3. I am trying to center a table within a post and for some reason it is not centering. Here is the url for this table (I have borders around the table for now, so it is easier to see): http://www.emcoconstruction.com/emco...venience-store
My main goal of using the table was to have the three images in one row, but centered across the page. If I chose to center each picture, they show up as one image per "line" and that image centered. So I went the route of putting the images into a table and centering the table. Here is the code for the table:
Code:
<table width="600" cellspacing="1" cellpadding="1" border="1" align="center">
<tbody>
<tr>
<td>
<a href="http://www.emcoconstruction.com/emco/wp-content/uploads/Jolly-2.jpg"><img width="150" height="150" class="alignleft size-thumbnail wp-image-117" title="Jolley Mart Convenience Store - Store Front" alt="Jolley Mart Convenience Store - Store Front" src="http://www.emcoconstruction.com/emco/wp-content/uploads/Jolly-2-150x150.jpg" /></a><a href="http://www.emcoconstruction.com/emco/wp-content/uploads/Jolly-3.jpg"><img width="150" height="150" class="alignleft size-thumbnail wp-image-118" title="Jolley Mart Convenience Store - Inside Store" alt="Jolley Mart Convenience Store - Inside Store" src="http://www.emcoconstruction.com/emco/wp-content/uploads/Jolly-3-150x150.jpg" /></a><a href="http://www.emcoconstruction.com/emco/wp-content/uploads/Jolly-4.jpg"><img width="150" height="150" class="alignleft size-thumbnail wp-image-119" title="Jolley Mart Convenience Store - Inside Store" alt="Jolley Mart Convenience Store - Inside Store" src="http://www.emcoconstruction.com/emco/wp-content/uploads/Jolly-4-150x150.jpg" /></a></p>
</td>
</tr>
</tbody>
</table>
Using align="center" in the table command did not work (although it does in "regular" html). I then put the following around the table
This also did not work.
I then added the following css code:
Code:
table.center td {
border:1px #fff;
background:#fff !important;
text-align:center;
}
then the following to the table piece of code Anyone have any idea as to why the table isn't centering???
|