[thelist] Tables expanding in Netscape (and other quirks)
rudy
r937 at interlog.com
Wed Aug 15 14:19:26 CDT 2001
> http://home.earthlink.net/~myershyatt/firelab/
> ... the left navigation bar expands wider than
> the pixel width I've set in in Dreamweaver
hi diana
what you're seeing is netscape's predilection to "balance" table columns
for you
first of all, congrats for using "stacked" tables rather than tossing your
entire page into one table
okay, the table with your nav bar looks like this --
<table width="720" align="left">
<tr>
<td width="140" height="0" valign="top"></td>
<td width="540" height="0" valign="top"></td>
</tr>
<tr>
<!-- start side nav bar -->
<td valign="top">
let's start with the table tag -- don't use align on the table tag unless
you have other content that you want flowed around the table (obviously,
that's not the case here)
your first row is a great technique -- by specifying widths on the first
row, you can forget about doing so on all the other rows
however, the widths don't add up -- no wonder the browser needs to fall
back on its own algorithms to determine column widths
i honestly don't know if height="0" is valid, but if i were the browser, i
would simply ignore the entire row
anyhow, the problem you're facing can be resolved in several ways, but
here's one method that i know works --
<table width="720">
<tr>
<td valign="top">
<!-- nav bar contents here-->
<img src="spacer.gif" width="140" height="1">
</td>
<td width="90%" valign="top">
<!-- main contents here-->
</td>
</tr>
</table>
the purpose of the 90% width on the main column is to force it open as wide
as possible
the purpose of the spacer gif in the nav bar column is to prevent
the nav bar from collapsing any narrower than 140
note the nav bar column does not have a width itself
other techniques for liquid tables are reviewed here --
http://evolt.org/article/LiquidTables/20/2321/evolt.org
anyhow, good luck, and don't rely on dreamweaver to show you what the page
will look like, always use a browser -- the only person looking at your
page in dreamweaver is you!
rudy
More information about the thelist
mailing list