Dimpie,

the only way to have a <tr> that is non-conforming in terms of widths or 
number of cells is to use tons of colspans. a picure's worth a thousand 
words:

http://tinyurl.com/bf7uys

<tr>s are shown in turquoise. desired end-user cells in white. actual 
cell (column) divisions required are shown by red lines. this requires 
colspans, shown in yellow.

basically this means that you end up with extra divistions and 
subsequent colspans cutting through NOT ONLY your non-conforming cells, 
but ANY cell that lines up with their non-conforming edges. these things 
can grow huge and messy like a hydra. for example, in my diagram, rows 
either have 3 or 4 cells each -- but the table structure needs to end up 
having 6 cells! i also always have the hardest time placing colspans 
within the table code. it's very unintuitive unless you use dreamweaver 
or something to do it for you.

the easy cheat for this is to use a second, inner <table> where your 
your 'details' row would be. ie:

<table>
   <tr>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
   </tr>
   <tr>
     <td colspan="2">
         <table>
           <tr>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
             <td>&nbsp;</td>
           </tr>
         </table>
     </td>
   </tr>
   <tr>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
   </tr>
</table>

having said all that, i'm pretty sure that a lot of the people on this 
list would use divs for all of it. divs are a lot more modern, by which 
i mean more obedient and more flexible, than tables. the common logic of 
separation of page structure and page content implies that tables are 
appropriate if and only if you're using "tabular data" -- but i think a 
lot of us give up on the table as soon as it has to be hacked. but 
perhaps your data isn't that "tabular"?



hope that helps.

josh


> What I did is create a details table row <tr> with a classname details, and 
> give the table cells different widths , but that doesn't work.
> I also created a table with <tbody> around each <tr>. But that doesn't work 
> either.
> 
> I am wondering if there is a way to get this result? What is the correct way 
> to do this?
> Please have a look at my attempts: http://www.glassbox.nl/test/table.html.
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to