Page 1 of 1

Collapsing table cells?

Posted: Wed Jun 13, 2007 11:57 pm
by alex.barylski
Tricky table problem.

I have the following:

Code: Select all

<table width="100%">
  <tr>
    <td>A</td>
    <td>B</td>
  </tr>
  <tr>
    <td colspan="2">C</td>
  </tr>
</table>
By applying the colspan in cell C the two cells above it are width calculated in half. Each is 50% the width of the of cell C

I cannot use width="100%" in cell A but that is the effect I am after. Actually to be exact I want cell B to automatically adjust to it's contents size, as I am already using width="100%".

Is this desired collasping effect possible?

Posted: Thu Jun 14, 2007 12:18 am
by feyd
If "C" is the last row you could generally use a div for it.

Posted: Thu Jun 14, 2007 1:17 am
by RobertGonzalez
What are you trying to achieve here hockey?

Posted: Thu Jun 14, 2007 9:11 am
by alex.barylski
Everah wrote:What are you trying to achieve here hockey?
It's hard to explain using just that example...no worries though I figured out another solution. :)