Re: 100% table width with pixel-width-specific columns?

by "Kehvan M. Zydhek" <kehvan(at)zydhek.net>

 Date:  Sun, 26 Mar 2000 17:28:30 -0800
 To:  "David Clapper" <dclapper(at)clioassociates.com>,
<hwg-techniques(at)hwg.org>
 References:  clapper02
  todo: View Thread, Original
David,

It's not elegant, but one solution I've found is to nest tables within other
tables... Specifically, create a two-column table at 100% width. The first
column would be another table with two columns set to specific widths. This
works most of the time, but still leaves the question about how to define a
percentage minus a specific width. My solution, therefore, would be:

<TABLE (blah blah blah) WIDTH="100%">
    <TR><TD WIDTH="px1+px2">
        <TABLE (blah blah blah) WIDTH="px1+px2">
            <TR><TD WIDTH="px1">
                data column 1
            </TD><TD WIDTH="px2">
                data column 2
            </TD></TR>
        </TABLE>
    </TD><TD (no width set)>
        data column 3
    </TD></TR>
</TABLE>

Of course, you could probably do the same with a three column table, just
not defining the final column width, but that frequently (in my tests)
causes the final table to be the wrong size). You'll likely have to
experiement with this, but I've found it works in most cases.

Good luck!
Kehvan M. Zydhek


----- Original Message -----
From: "David Clapper" <dclapper(at)clioassociates.com>
To: <hwg-techniques(at)hwg.org>
Sent: Sunday, March 26, 2000 15:18
Subject: 100% table width with pixel-width-specific columns?


> Hi,
>
> I have a table which has 3 columns.  We want the first and second columns
to
> be specific pixel widths - but we want the third (rightmost) column to
fill
> the remainder of the page.  Can't quite seem to figure this one out.
>
> Any advice appreciated .. (P.S. The pages in question can be found at
> http://www.clioassociates.com/pinnacle/default.htm and
> http://www.clioassociates.com/pinnacle/crimescene.htm)
>
> Thanks!
>
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA