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 »

[SOLVED] How to center text in the table?


  #1  
Old Feb 1, 2011, 10:22 PM
ochayemin
 
9 posts · Nov 2010
I've created a new page. I click on the HTML tab and enter the table info I need. See example below

Both the header and the cell content should be centered, but I'm finding:
- When I look at the table in the "visual" tab in the admin tool, the text is centered
- When I look at the page in either FF or IE, *neither* the header or the cell is centered

Suggestions on how to fix?

George


<table border="1">
<tbody>
<tr>
<th></th>
<th align="center">Photos Per Page</th>
<th align="center">Price Per Page</th>
<th align="center">Comments</th>
</tr>
<tr>
<td rowspan="3"><img style="float: left; padding: 0 0ex 0ex 0;" src="http://localhost/Photo_album.gif" alt="" width="100" height="90" /></td>
<td width="90" align="center"><span style="font-size: small;">2</span></td>
<td width="90" align="center"><span style="font-size: small;">30¢</span></td>
<td rowspan="3" align="center"><span style="font-size: small;"> </span>
<ul>
<li><span style="font-size: small;">To prevent damage, Aberscan will not remove photos from an album. We will scan the entire page, then manually crop out the photos</span></li>
</ul>
</td>
</tr>
<tr>
<td align="center"><span style="font-size: small;">3</span></td>
<td align="center"><span style="font-size: small;">45¢</span></td>
</tr>
<tr>
<td align="center"><span style="font-size: small;">4 or more</span></td>
<td align="center"><span style="font-size: small;">60¢</span></td>
</tr>
</tbody>
</table>
  #2  
Old Feb 6, 2011, 10:33 PM
ochayemin
 
9 posts · Nov 2010
I have one more observation. When I change the alignment in ATO->Style Tables for table headers and table cells to "center", then all my cells are centered. It is as if the ATO -> Style settings are being set after the <td align="xxx"> setting, thus overwriting the align control I'd like for each cell. I don't want every cell to be aligned center or aligned left.

thoughts?
  #3  
Old Feb 7, 2011, 05:15 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Because of the nature of the cascading in CSS, you are picling up 'text-align's from parent elements. What you should do is code your own CSS for your tables with your own classed. For example where you have
HTML Code:
<table border="1">
<tbody>
<tr>
<th></th>
<th align="center">Photos Per Page</th>
<th align="center">Price Per Page</th>
<th align="center">Comments</th>
use
HTML Code:
<table border="1" id="my-post-table">
<tbody>
<tr>
<th></th>
<th class="my-table-center">Photos Per Page</th>
<th class="my-table-center">Price Per Page</th>
<th class="my-table-center">Comments</th>
and then you could just add a css insert
HTML Code:
#my-post-table .my-table-center{ text-align: center;}
any element you wanted left aligned, you could add a class of my-table-left' and
HTML Code:
#my-post-table .my-table-left{ text-align: left;}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Feb 7, 2011, 10:48 PM
ochayemin
 
9 posts · Nov 2010
Thanks!!

I also found I can just remove the alignment keywords the ATO->Style Table page and let the html code do the alignment in the cells needed.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Center Area - Middle Table configuration problems sighedeffects Center area post/pages 0 Aug 31, 2010 04:24 PM
How to Add Zebra Effect to Single Table with WP Table-Reloaded Plugin c12281 Plugins & Atahualpa 8 Aug 1, 2010 03:53 PM
[SOLVED] Center post text not behaving like wot I want - bad text! leshall Center area post/pages 5 Feb 4, 2010 01:56 PM
Table in center column cannot be displayed properly mikechui Header configuration & styling 1 Dec 23, 2009 06:30 AM
[SOLVED] Center Text in Text Widget container kippiper Sidebars & Widgets 2 Nov 13, 2009 03:51 AM


All times are GMT -6. The time now is 05:37 AM.


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