How Can I control Table Column Widths?

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
mike177
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 103
Joined: Wed Mar 18, 2009 4:44 am

How Can I control Table Column Widths?

Post by mike177 » Mon Jun 01, 2009 4:10 pm

Hello,
Ok, I must be missing something really obvious....

how can I control the width of the columns in the tables that are in my articles?

For example,
http://blog.homeprodigy.com/home-prodig ... creek.html
then look for the 3 tables starting with "Nearby Zip Code Census and Crime".

Any thoughts on how to make the columns line up?

Thanks,
Mike

GeoUK
Joomla! Guru
Joomla! Guru
Posts: 770
Joined: Thu Jun 01, 2006 9:28 am
Location: Scotland

Re: How Can I control Table Column Widths?

Post by GeoUK » Mon Jun 01, 2009 4:56 pm

Your maths in working out the table widths is wrong and the columns are showing up as defined in the source HTML. You also have extra HTML tags in the cells that you don't need.

The first table (Community Summary) is defined as

Code: Select all

<table style="height: 596px;" border="1" cellpadding="0" cellspacing="0" width="593">
<tbody>
<tr>
<td valign="top" width="229">
<p><strong><span style="text-decoration: underline;">Community Summary</span></strong><strong><span style="text-decoration: underline;"></span></strong></p>
</td>
<td valign="top" width="178">
<p><strong>75228, TX</strong></p>
</td>
<td valign="top" width="178">
<p><strong>DALLAS, TX</strong></p>
</td>

</tr>
Width 593
Column widths 229 + 178 + 178 = 585

Notice that columns two and three are the same width 178.

In the next table (Highest Level Attained)

Code: Select all

<table style="height: 218px;" border="1" cellpadding="0" cellspacing="0" width="591">
<tbody>
<tr>
<td valign="top" width="235">
<p><strong><span style="text-decoration: underline;">Highest   Level Attained</span></strong><strong><span style="text-decoration: underline;"> </span></strong><span style="text-decoration: underline;"></span></p>
</td>
<td valign="top" width="180">
<p><strong>75228, TX</strong></p>

</td>
<td valign="top" width="158">
<p><strong>DALLAS, TX</strong></p>
</td>
</tr>
Width 591
Column widths 235 + 180 + 158 = 573

Notice that column two and three are different sizes and don't match column two and three of the previous table.

To get the columns to line up you will need to define them the exact same way.

mike177
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 103
Joined: Wed Mar 18, 2009 4:44 am

Re: How Can I control Table Column Widths?

Post by mike177 » Mon Jun 01, 2009 6:55 pm

Thanks for the reply.

Perhaps I should state the issue this way. I am using JCE as my editor and there does not seem to be any way to edit the column width. I can edit the table's row height and I can edit the entire tables size, but there does not seem to be anyway to control the individual column widths from within the WYSIWYG editor.

Any directions / help on what I am over looking would be much appreciated.

Regards,
Mike

GeoUK
Joomla! Guru
Joomla! Guru
Posts: 770
Joined: Thu Jun 01, 2006 9:28 am
Location: Scotland

Re: How Can I control Table Column Widths?

Post by GeoUK » Mon Jun 01, 2009 7:41 pm

In JCE you can use 'Table Cell Properties' to set the width of the top cell in the column. This then cascades through the table.

acav802
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Mar 17, 2009 1:57 am

Re: How Can I control Table Column Widths?

Post by acav802 » Mon Jun 14, 2010 6:23 am

This was very helpful info, but I am wondering if there is a way in JCE or other editor to click & drag to adjust td width e.g. how you can in Dreamweaver?
Thanks!

User avatar
gilles007
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 237
Joined: Fri Jun 15, 2007 4:58 pm

Re: How Can I control Table Column Widths?

Post by gilles007 » Mon Sep 29, 2014 6:52 pm

@GeoUK,
old post but helped me nonetheless.
Thanks :)
G

User avatar
Mzlaki
Joomla! Apprentice
Joomla! Apprentice
Posts: 49
Joined: Fri Jan 29, 2010 7:18 am

Re: How Can I control Table Column Widths?

Post by Mzlaki » Tue Nov 10, 2015 12:10 pm

GeoUK wrote:In JCE you can use 'Table Cell Properties' to set the width of the top cell in the column. This then cascades through the table.
Thank you!!!


Locked

Return to “Extensions for Joomla! 1.5”