PDA

View Full Version : thead - tfoot - tbody - with border?


Jerome
05-23-2003, 05:32 PM
Hi,

Maybe a silly question, but I don't seem to be able to have a border around my thead, tfoot or tbody.

using a separate css-file, i tried with class as well as id

Ofcoure, table and td borders work well.

IE 5.0 has problems with a scrollable tbody, borders not to?

Jerome

Roy Sinclair
05-23-2003, 06:43 PM
The following table doesn't give the results I expect in IE or Moz though Moz comes closer. Removing the style from the table removes all the borders in both browsers though even though the other objects still try to style borders.


<table id="myTable" summary="" style="border-collapse: collapse; border:solid yellow 4px;">
<caption>Sample Table</caption>
<col style="border:solid #333333 4px;">
</col>
<col style="border:solid #cccccc 4px;">
</col>
<thead style="border: solid red 4px;">
<tr>
<th>
Col1
</th>
<th>
Col2
</th>
</tr>
</thead>
<tbody style="border: solid black 4px;">
<tr id="row1">
<td id="row1cell1">
R1 C1
</td>
<td id="row1cell2">
R1 C2
</td>
</tr>
<tr id="row2">
<td id="row2cell1">
R2 C1
</td>
<td id="row2cell2">
R2 C2
</td>
</tr>
</tbody>
<tfoot style="border: solid green 4px;">
<tr>
<td>
F1
</td>
<td>
F2
</td>
</tr>
</tfoot>
</table>

zoobie
05-24-2003, 07:52 AM
The <caption> doesn't work in NS...I think ;)

brothercake
05-24-2003, 11:53 PM
<caption> works in netscape, but you can't style it in netscape 4 by going

caption { }

you have to go <caption class="something"> and

caption.something {}

Jerome
05-27-2003, 02:24 PM
Works well!

Thanks,
Jerome