[thelist] [fwd] Netscape 6 and expandable table hack

Sam-I-Am sam at sam-i-am.com
Mon Jun 4 10:03:18 CDT 2001


I use a variation on this, documented in this page:
(down the bottom)

http://www.sam-i-am.com/misc/TestSuite/tables/flexible_width.html

basically instead of using %ages, you use some larger number like 5000
for the column you want to expand. All the others can have their actual
widths. 
It works too for multiple flexible columns, though it gets tricky.

I've not had any problems with it (bar the IE5 beta) but I've not done a
round of testing recently in the newest browsers. 

This way has the advantage that 1% is often still too wide if you want a
single pixel vertical rule. The disadvantage is the horrible feeling
that it's going to break badly somewhere someday.

Sam

> There is a common hack for making a table that has one expandable column
> with other columns that appear to be static.  To achieve this you might
> code
> something like this:
> 
> <table width="100%" cellpadding="0" cellspacing="0" border="0">
>   <tr>
>     <td width="1%"><img src="spacer.gif" height="5" width="150"></td>
>     <td width="98%">Expandable column</td>
>     <td width="1%"><img src="spacer.gif" height="5" width="150"></td>
>   </tr>
> </table>
>




More information about the thelist mailing list