What DTD will actually let the colspan work properly?
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?
Is this by design? Any ideas?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>width in td</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<table border="1" cellpadding="0" cellspacing="0" summary="">
<tr><td width="200px">b</td><td width="100px">c</td></tr>
Almost, sorry I should have given an example.
The table width is 100% and the lower right cell should be automatic. The lower left cell being 15px.
When I put width="100%" in rightcell it squishes the img cell regardless of width.
<tr><td width="15">img</td><td [width="100%"]>rightcell</td></tr>
This is the way it works; the 100% over rides the value in the left cell.
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.
This is all that is needed:
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.
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.
15px is very narrow so any text will be squashed, images will retain their true width.
Can you give a full example/page?
The problem maybe in another container or css.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)