Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

Centering a table


  #1  
Old Sep 22, 2010, 04:13 PM
globalnerds's Avatar
globalnerds
 
43 posts · Nov 2009
Saratoga Springs, NY
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

Code:
<p align="center">
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
Code:
 class="center"
Anyone have any idea as to why the table isn't centering???
__________________
Gary GlobalNerds.com
  #2  
Old Sep 22, 2010, 06:38 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Last edited by juggledad; Sep 23, 2010 at 04:52 AM. Reason: Spelling

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Add Zebra Effect to Single Table with WP Table-Reloaded Plugin c12281 Plugins & Atahualpa 8 Aug 1, 2010 04:53 PM
[SOLVED] Table Format for a Single Table joan Center area post/pages 4 Jul 13, 2010 10:03 AM
centering page aveeshkumar Atahualpa 3 Wordpress theme 0 Feb 1, 2010 02:06 AM
centering tables cyberstar Atahualpa 3 Wordpress theme 5 Nov 30, 2009 06:54 AM
More centering billc108 Page & Category Menu Bars 2 Jul 27, 2009 06:40 PM


All times are GMT -6. The time now is 12:33 PM.


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