Forum How do I...?

TABLES

somnath
Hi,

In my XML, table is coded like this:
<table frame="none">
  <tgroup cols="3">
    <colspec align="left" colnum="1" colname="c1" colwidth="81pt" colsep="0"/>
    <colspec align="left" colnum="2" colname="c2" colwidth="71pt" colsep="0"/>
    <thead>
      <row>
        <entry colname="c1">Head 1</entry>
        <entry colname="c2">Head 2</entry>
      </row>
    </thead>
    <tbody>
      <row>
        <entry colname="c1">Text in Col1</entry>
        <entry colname="c2"/>
      </row>
      <row>
        <entry colname="c1">Text in Col2</entry>
        <entry colname="c2"/>
      </row>
      <row>
    </tbody>
  </tgroup>
</table>

For this, I use the following CSS definitions:
table { display: table; table-layout: auto; width: 100%; }
thead { display: table-header-group; }
tbody {display: table-row-group; }
row { display: table-row; }
entry { display: table-cell; width: 100%; empty-cells: show; }

This does not give me a tabular structure. Also I want to use 'colwidth' specified in colspec as widths to respective table cells.

Can anyone help?


Thanks,
Somnath
mikeday
The tgroup element could be causing problems, as the default display value will be "inline" if not specified. Perhaps make the tgroup element display: table, and the table element display block?