PDA

View Full Version : Nested Tables


tedloh
08-30-1999, 03:19 PM
Some days I just absolutely hate Netscape :(

After the better part of a day, I finally came up with most of a template which will represent my site.[nbsp][nbsp]Tested in IE - works great.[nbsp][nbsp]Tested in Netscape, after much work, works great.

So, for the meat, I add a table in the main cell.[nbsp][nbsp]IE - works great.[nbsp][nbsp]Netscape - no go.

Here are the two htmls:
http://www.tygresystems.com/okay.html
http://www.tygresystems.com/notokay.html

leave you to guess which is which... LOL

The code that was added was:

<td rowspan=&quot;2&quot; colspan=&quot;9&quot; valign=&quot;top&quot;>

<!-- PROBLEM STARTS HERE! -->
<table border=&quot;0&quot; width=&quot;100%&quot; cellpadding=&quot;1&quot; cellspacing=&quot;4&quot;>
<tr>
<td valign=&quot;top&quot; width=&quot;40%&quot;><!-- begin column 1 -->&amp;nbsp;</td>
<td valign=&quot;top&quot; width=&quot;3&quot; background=&quot;images/vbar.gif&quot;>&amp;nbsp;</td>
<td valign=&quot;top&quot; width=&quot;40%&quot;><!-- begin column 2 --><center>News Flash!</center>Tygre Systems is moving![nbsp][nbsp]As of September 3, Tygre Systems will relocate from Seri Center to Taiping Towers in order to provide better service and support to its customers.[nbsp][nbsp]<a href=&quot;move.html&quot;>...more</a>
<center>Dave Barry's column now available at Tygre!</center><a href=&quot;dbarry.html&quot;><img src=&quot;images/dbarry.jpg&quot; border=&quot;0&quot; align=&quot;right&quot; alt=&quot;Dave Barry!&quot; width=&quot;121&quot; height=&quot;120&quot;> </a>You've read his witty columns in the Bangkok Post or one of hundred of newspapers worldwide.[nbsp][nbsp]This Pulitzer Prize-winning journalist is followed by tens of thousands of people worldwide every week.


By special arrangement with the Miami Herald, links to every column Dave Barry has published in the past two years is now available in the Columns area of Tygre.[nbsp][nbsp]For this privilege we must thank Janine Warner, Online Managing Director of the Miami Herald, without whose assistance this would not have been possible.

So, without further ado, we present...[nbsp][nbsp]<a href=&quot;dbarry.html&quot;>Dave Barry!</a></td>
<td width=&quot;20%&quot; valign=&quot;top&quot; align=&quot;center&quot; bgcolor=&quot;black&quot;><!-- begin column 3 -->&amp;nbsp;</td>
</tr>
</table>
<!-- PROBLEM ENDS HERE! -->
</td>

I've discovered that it's the &quot;width=x%&quot; settings that cause things to go nuts, but for the life of me I can't figure out why.

Anyone out there encounter this yet?[nbsp][nbsp]

Testing
08-30-1999, 03:26 PM
<td valign=&quot;top&quot; width=&quot;40%&quot;></td>
<td valign=&quot;top&quot; width=&quot;3&quot;></td>
<td valign=&quot;top&quot; width=&quot;40%&quot;></td>

In the above, you can't (shouldn't) use percentages and pixel widths together - you should set the second TD's width to 20%, or specify a pixel width on the other 2 (I haven't been to the pages in question yet)...

Hope this helps.

<edit>
Oops - used my test post user hehe :)
</edit>
[This message has been edited by Justin (edited 08-30-99)]

tedloh
08-30-1999, 03:35 PM
Welcome to the forum Testing ;)

Seriously, that ain't it though.[nbsp][nbsp]I knew about that but I left it in because it actually didn't cause a problem at first.[nbsp][nbsp]I'm sure it has to do with the way Netscape handles percentages within tables - it obviously gets confused or something.

Go take a look and see what the &quot;real&quot; problem is LOL!
------------------
Ted (Chief Do-It-All)
Tygre Systems Co Ltd
Bangkok, Thailand, Land of Smiles :) :)
http://www.tygresystems.com (work in progress)
ted@tygresystems.com

sheila
08-30-1999, 04:42 PM
Ted,

Very quick...maybe if more posts in this thread will take more time to look at it later...

I would definitely not mix percents and pixels. I am assuming that what is &quot;not good&quot; about the second URL is the way the tabs have spaces between them. If you're going for a very particular look with graphics, I would stick to fixed pixel widths.

Also, try adding the following attribute to your image tags:
hspace=&quot;0&quot; vspace=&quot;0&quot;
This tells the browser to put zero vertical and horizontal space around your images. Might help to line them up smack dab against each other.

This is a topic of discussion that repeatedly makes the rounds in alt.html. If you go to Deja.com and search on &quot;tables&quot; and &quot;Netscape&quot; I'm sure you'll find more messages than you would want to read, but reading a few well chosen threads might help you to find the tips you need.

Dean B
08-30-1999, 04:46 PM
Both look the same to me in NN 4.61 at 1152 res apart from the obvious text/pic omissions ..

Dean.

sheila
08-30-1999, 05:25 PM
Dean wrote: Both look the same to me in NN 4.61 at 1152 res apart from the obvious text/pic omissions ..
Wow. Interesting how resolution can affect things. They certainly don't look the same at 800x600 res.

Rich
08-30-1999, 06:51 PM
hmmmm...40%+40%+20%+3px...doesn't add up to me. :)

Rich

tedloh
08-30-1999, 10:19 PM
I should've stated myself more clearly.[nbsp][nbsp]The problem is what Sheila pointed out - spaces between the tabs.[nbsp][nbsp]Everything else is the way it's supposed to be.

The mixing of percentages and pixels, while not recommended, does work in both Netscape and IE.[nbsp][nbsp]So even 40%+40%=20%+3px is workable.

Rich - I tried all resolutions - the problem occurs at each resolution.

Sheila - checked Deja, which is its usual mess LOL.[nbsp][nbsp]No answers there, but then I didn't search beyond this month.

I think I'm going to have to resort to what others are saying - NO nested tables.[nbsp][nbsp]What a pain :(

------------------
Ted (Chief Do-It-All)
Tygre Systems Co Ltd
Bangkok, Thailand, Land of Smiles :) :)
http://www.tygresystems.com (work in progress)
ted@tygresystems.com