Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE Table Cell Height Oddity

Status
Not open for further replies.

Azathoth

Technical User
Jul 14, 2003
61
US
I'm trying to keep a cell on the top left side of a table a constant size. Unfortunately in IE with the method I'm using, the two cells that are spanned by a td with rowspan=2 become the same size. If you render the blow code in firefox, it behaves the way I want and expect, but not in IE. Can anyone concieve of a way to make this display properly in IE?

Code:
<table width='400' border='2'>
<tr rowspan='2'>
   <td height='10'>
      <p> aaa </p>
   </td>
   <td rowspan='2'>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
   </td>
</tr>
<tr>
   <td>
      <p> bbb </p>
   </td>
</tr>
</table>
 
Maybe there is another way of doing what you want. From your example, it looks as though you are using tables for the layour of your page rather than for tabular data? Is that the case, and if so, maybe you should consider a different approach using CSS.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Also, try [tt]table-layout: fixed;[/tt]. But you should really follow ca8msm's advice actually.
 
The image idea would work to contrain the minimum height of that table cell, but say the rightmost cell (containing ccc) were to expand in height. Then the upper left cell would still grow.

I've thought about ways of getting the height attribute via getElementById of the rightmost cell, but if the height is determined automatically, this attribute doesn't exist. Is there any other way to do this?
 
Code:
<table width='400' border='2'>
<tr rowspan='2'>
   <td height="10">
      <p> aaa </p>
   </td>
   <td rowspan='2'>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
      <p> ccc </p>
   </td>
</tr>
<tr>
   <td [red]height="350"[/red]>
      <p> bbb </p>
   </td>
</tr>
</table>

Clive
 
Unfortunately, so will aaa, which is what I'm trying to avoid. I guess I'll have to set something up with div tags and absolute positioning...thanks for the suggestions everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top