Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Table trobules

Table trobules
Thread Tools
Synotic
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Sep 11, 2004, 01:39 PM
 
It's been a long time since I've had to rely on tables for anything layout-wise, so I'm a bit rusty. It's probably easier just to check the code below, but what I'm trying to do is have 3 column table, with the third column having 3 individual rows. I want the 3 rows in the third column to be evenly distributed (the first should be at the top, the second should be in the middle, and the third should be at the bottom). It seems that Firefox renders my code appropriately enough, but ie:mac and Safari don't. I haven't checked IE6, but it'll need to work there as well.

Code:
<table border="1" cellspacing="0" cellpadding="0"> <tr> <td rowspan="3">text</td> <td width="445" rowspan="3"> long text<br /> long text<br /> long text<br /> long text<br /> long text<br /> long text<br /> long text<br /> long text<br /> long text<br /> long text </td> <td height="20">a</td> </tr> <tr><td colspan="3">b</td></tr> <tr><td height="20" colspan="3">c</td></tr> </table>
The amount of "long text" will be variable. The widths and 20px heights will always remain the same. Is there anyone I can get this working? Thanks
     
Simon Mundy
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Sep 11, 2004, 11:22 PM
 
Originally posted by Synotic:
It's been a long time since I've had to rely on tables for anything layout-wise...
Ouch. You've just opened an old wound... Something to do with IE4 and NS4 never quite working right unless I just put ANOTHER table inside then another and then... AARRGGHHH!!!

Anyways, had a quick look and it's an exercise in futility. Your best bet would be to only use a rowspan of 2 and then 'fake' the 3rd row to make it look like it's part of the middle section (some colour, etc...). That way Safari will stretch the 2nd row to fit (couldn't be bothered to check IE for Mac).

Hope that helps FWIW!

Computer thez nohhh...
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Sep 12, 2004, 08:22 AM
 
burn in hell!
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Synotic  (op)
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Sep 13, 2004, 03:29 PM
 
Originally posted by Simon Mundy:
Ouch. You've just opened an old wound... Something to do with IE4 and NS4 never quite working right unless I just put ANOTHER table inside then another and then... AARRGGHHH!!!

Anyways, had a quick look and it's an exercise in futility. Your best bet would be to only use a rowspan of 2 and then 'fake' the 3rd row to make it look like it's part of the middle section (some colour, etc...). That way Safari will stretch the 2nd row to fit (couldn't be bothered to check IE for Mac).

Hope that helps FWIW!

Thanks, it seems like it sort of works, but I need to have the first and second column stretched to the full height of the table. I ended up just using a table to vertically center my middle block and then absolutely positioned the top and bottom blocks... it's dirty but seems to work so far.

Thanks (and Phil too) for your help
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Sep 13, 2004, 04:17 PM
 
Originally posted by Synotic:
Thanks (and Phil too) for your help
any time
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:30 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,