Thread: dumb tables question
Results 1 to 8 of 8
Related
-
Question about HTML tables and stylesheets Forum: HTML Forum
Replies: 0 -
TABLES- can any one help me stop the text streching the tables. Forum: HTML Forum
Replies: 2 -
new member: Dinrock w/question regarding TABLES Forum: HTML Forum
Replies: 5 -
Avoiding nested tables or grouping separate tables in chunks Forum: HTML Forum
Replies: 2 -
hi im new to the boards w/ a quick question on tables Forum: HTML Forum
Replies: 8
-
07-08-2004, 02:59 AM #1
dumb tables question
Ok, the following code works fine in mozilla, but it in explorer the two cells on the right are both at 50%...how do i make the first cell in the second column actually stay at 20px high in IE?...
( obviously this code is dumbed down from a much larger page - yes i know it would be easy to just put a div at the top of the second column BUT thats not an option! )
<table width=100% bordercolor=black border=1 cellspacing=0 cellpadding=0>
<tr>
<td rowspan=2 bgcolor=880000 valign=top>
test<br>test<br>test<br>test<br>test<br>
test<br>test<br>test<br>test<br>test<br>
</td>
<td height=20 valign=top bgcolor=red style="height: 20px;">
be 20 px or else
</td>
</tr>
<tr>
<td bgcolor=blue valign=top>
be bigger than the first cell or else!
</td>
</tr>
</table>
-
07-08-2004, 07:12 AM #2
Hi,
im using IE6. If you set the heights for the other table cells it works fine!
krak_d
-
07-08-2004, 07:19 AM #3bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Hi there Variable,
To get it to work in I.E. you will need to specify a height for both td cells....
css
Code:<style type="text/css"> <!-- table { width:100%; border:solid 1px #000000; border-collapse:collapse; } #left { background:#880000; vertical-align:top; } #top { background:#ff0000; height:20px; } #bottom { background:#0000ff; height:160px; vertical-align:top; } //--> </style>
Code:<table><tr> <td id="left" rowspan="2">test<br />test<br />test<br />test <br />test<br />test<br />test<br />test<br /> test<br />test</td> <td id="top">be 20 px or else</td> </tr><tr> <td id="bottom">be bigger than the first cell or else!</td> </tr></table>
-
07-08-2004, 07:22 AM #4bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Hi there krak_d,
You certainly type fast
You weren't on the board when I started to answer this one
coothead
-
07-08-2004, 08:43 AM #5
Hi Coothead,
i think there may a bug somewhere as i've noticed in the past when you have answered several questions you didn't show up as being logged in at all!
-
07-08-2004, 11:13 AM #6
Ahh there is where the problem lies, the height of the second cell varies from page to page
. Any way to do it without knowing the height of the second TD?
-
07-08-2004, 12:13 PM #7
All cells in a table row will be the same height, no way around this other than the rowspan attribute which will probably not give you what you are looking for.
Dave
-
07-09-2004, 08:03 AM #8