Forum How do I...?

Column Widths without Colgroup

lsimon
The documents we create use a lot of tables, and some of those tables can get fairly complex (heads are optional, lots of spans, occasional specific column widths on purpose). Right now we build CALS tables in our XML, which we are converting to HTML tables through XSLT.

I can't find documentation on colgroup, but I'm learning that doesn't mean that it's entirely unsupported. So I'll start by asking this: am I implementing incorrectly, or is colgroup/col unsupported?

Sample Teenie Table:
<table border="0">
<colgroup>
<col align="left" class="COLSPEC0" width="5%"/>
<col align="left" class="col1" width="47%"/>
<col align="left" class="col2" width="48%"/>
</colgroup>
<thead valign="bottom">
<tr>
<th>
<para revised="false"/>
</th>
<th>
<para revised="false">
<bold>Code Reference</bold>
</para>
</th>
<th>
<para revised="false">
<bold>Type of Regulation</bold>
</para>
</th></tr>
</thead>
<tbody valign="top">
<tr>
<td>
<para revised="false"/>
</td><td>
<para revised="false">Chapter 20</para>
</td><td>
<para revised="false">Refuse Code</para>
</td></tr>
</tbody>
</table>


Relevant CSS
table { 
	display: table; 
	table-layout: fixed; 
	width: 6in;
}
colgroup {
	display:table-column-group;
}
col {
	display:table-column;
}
thead {
	display: table-header-group;
}
tbody {
	display: table-row-group;
}
th{
	display:table-cell;
}
tr { 
	display: table-row; 
}
td { 
	display: table-cell; 
	empty-cells: show;
}
mikeday
Some properties are supported on col elements, including width, but not text alignment.
lsimon
Width was what we were having trouble with - that's the one that can get tricky when you're allowed to span wherever. :)

Looks like width as a direct attribute is not supported, but style="width:48%;" is. I'll keep that in mind in the future.

Thanks!