KOMPX.COM or COMPMISCELLANEA.COM   

Making the last column of an HTML table to take up all the remaining space

Making the last column of an HTML table to occupy all the remaining space by means of HTML only, no CSS:

One Two Last
Data Data Data

HTML code:


<table cellpadding="20" cellspacing="0" border="1">
	<tr>
		<th>One</th>
		<th>Two</th>
		<th width="100%">Last</th>
	</tr>
	<tr>
		<td>Data</td>
		<td>Data</td>
		<td>Data</td>
	</tr>
</table>

Note: it is <th width="100%"> that makes the trick, cellpadding="20", cellspacing="0" and border="1" are just for the look.

Browser support
Windows
Internet Explorer 4.0+
Firefox 1.0+
Google Chrome
Opera 7.0+
Safari 3.1+
SeaMonkey 1.0+
Mozilla 0.6+
Netscape 2.02+
Dillo
Linux
Firefox 1.0+
Google Chrome / Chromium
Opera 7.0+
SeaMonkey 1.0+
Mozilla 0.6+
Netscape 2.02+
NetSurf 3.0
Dillo
Hv3
More