Useless colspan

liunx

Guest
What DTD will actually let the colspan work properly?<br />
<br />
Im using XHTML1.0 Trans and when I have two cells below a cell with colspan=2, I cant set the width of either of the bottom cells? Whats up?<br />
<br />
Is this by design? Any ideas?<br />
<br />
Thanks.<!--content-->Like this?<br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"<br />
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><br />
<head><br />
<title>width in td</title><br />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /><br />
</head><br />
<body><br />
<table border="1" cellpadding="0" cellspacing="0" summary=""><br />
<tr><td colspan="2">a</td></tr><br />
<tr><td width="200px">b</td><td width="100px">c</td></tr><br />
</table><br />
</body><br />
</html><!--content-->Almost, sorry I should have given an example.<br />
<br />
The table width is 100% and the lower right cell should be automatic. The lower left cell being 15px.<br />
<br />
<br />
<table width="100%"><br />
<tr><td colspan="2">blah</td></tr><br />
<tr><td width="15">img</td><td [width="100%"]>rightcell</td></tr><br />
</table><br />
<br />
<br />
When I put width="100%" in rightcell it squishes the img cell regardless of width.<!--content-->This is the way it works; the 100% over rides the value in the left cell.<br />
There is no need to have 100% in the right cell, it will stretch automatically to take up the rest of the width of the table.<br />
This is all that is needed:<br />
<br />
<table width="100%"><br />
<tr><td colspan="2">blah</td></tr><br />
<tr><td width="15">img</td><td>rightcell</td></tr><br />
</table><!--content-->No, thats why I put the brackets around [width=100%] because when its not there, the leftcell is too big and doesnt stay at width=15 and when it is there, its squishes down to whatever is in its cell.<br />
<br />
I dont mind the second part, it makes sense. But having a table with width 100% and the left cell having width 15, it should work.<!--content-->15px is very narrow so any text will be squashed, images will retain their true width.<br />
Can you give a full example/page?<br />
The problem maybe in another container or css.<!--content-->
 
Back
Top