Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Centering a table (http://forum.bytesforall.com/showthread.php?t=9812)

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:


<table width="600" cellspacing="1" cellpadding="1" border="1" align="center">
            <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>

Using align="center" in the table command did not work (although it does in "regular" html). I then put the following around the table


<p align="center">
This also did not work.

I then added the following css code:


table.center td {
border:1px #fff;
background:#fff !important;

then the following to the table piece of code

Anyone have any idea as to why the table isn't centering???

lmilesw Sep 22, 2010 05:38 PM

I have not tested buy you could wrap the table in a div, add a class for the div, and then try one of two things.
  • Use text-align:center for the div
  • OR give the div a width and set the left and right margins to auto

All times are GMT -6. The time now is 04:09 AM.

Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.