Menu

#1127 Column widths don't match in HTML table when using thead

v1.0_(example)
open
nobody
None
1
2016-07-29
2016-07-29
Egon Schmid
No

Example:

<table border="1">
    <thead>
        <tr>
            <th width="50">header1</th>
            <th width="75">header2</th>
            <th width="100">header3</th>
        </tr>
    </thead>
    <tr nobr="true">
        <td>row11</td>
        <td>row12</td>
        <td>row13</td>
    </tr>
    <tr nobr="true">
        <td>row21</td>
        <td>row22</td>
        <td>row23</td>
    </tr>
</table>

If you define column withs only in the first row inside a , they don't match with the following rows.

As a workaround, copying the width definitions in the next row, then they match:

<table border="1">
  <thead>
    <tr>
      <th width="50">header1</th>
      <th width="75">header2</th>
      <th width="100">header3</th>
    </tr>
  </thead>
  <tr nobr="true">
    <td width="50">row11</td>
    <td width="75">row12</td>
    <td width="100">row13</td>
  </tr>
  <tr nobr="true">
    <td>row21</td>
    <td>row22</td>
    <td>row23</td>
  </tr>
</table>
1 Attachments

Discussion


Log in to post a comment.