A way to make the last cell expand?

windows

Guest
I was wondering if there was a nice way to create cells such that the first few are together and evenly spaced, but the last one stretches out to fill out the rest of the table width of 100%?<br />
<br />
ie <br />
<br />
[ cell 1 ][ cell2 ][ cell3 ][cell 4-------------------------------]<br />
<br />
At the moment Cells 1,2 and 3 spread out and take up most of the space and cell 4 is tiny. I do not want to set the width of Cells 1-3 as the text length will change depending on the language chosen. So somehow I need to tell cell 4 to expand.<br />
<br />
Any solution in HTML tables or CSS is welcome! BUT, there's one tricky thing - I cannot use images (e.g. spacer.gif).<br />
<br />
Thanks<br />
Carey<!--content--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"<br />
"http://www.w3.org/TR/html4/strict.dtd"><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<meta name="Content-Style-Type" content="text/css"><br />
<title>Example</title><br />
<br />
<style type="text/css"><br />
<!-- <br />
table {width:100%}<br />
th, td {border:solid 1px #a00}<br />
--><br />
</style><br />
<br />
<table><br />
<tr><br />
<th style="width:10%">&nbsp;</th><br />
<th style="width:10%">Heading</th><br />
<th style="width:10%">Heading</th><br />
<th style="width:70%">Heading</th><br />
</tr><br />
<tr><br />
<th>Heading</th><br />
<td>Data</td><br />
<td>Data</td><br />
<td>Data</td><br />
</tr><br />
<tr><br />
<th>Heading</th><br />
<td>Data</td><br />
<td>Data</td><br />
<td>Data</td><br />
</tr><br />
<tr><br />
<th>Heading</th><br />
<td>Data</td><br />
<td>Data</td><br />
<td>Data</td><br />
</tr><br />
</table><!--content-->Thanks but it's not quite what I was after. I can't set any of cell 1-3 widths, because in fact I don't actually know if there will be 3 or 4 or 7 fields, given that the <td></td> is dynamically generated. I've tried <td width="100%"> in the last cell, but I think it's a bit of a hack.<!--content-->
 
Back
Top