0

I have a table like this

A header Another header
A1 B1
A2 B2
A3 B3

I want it to be like this

A header A1 A2
Another header B1 B2
Another header C1 C2

I'm working with Thymeleaf, so if I use the normal way to write every line individually, it can't work because sometimes I have for 1 column more than a row, so I need a way to work with Thymeleaf conditions <span th:text="${{ .....}}"></span>

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197

1 Answers1

0

You can define the column width for the table

<table border="solid">
  <tr>
    <th width="100">A header</th>
    <th width="150">Another header</th>
  </tr>
  <tr>
    <td>A1</td>
    <td>B1</td>
  </tr>
  <tr>
    <td>A2</td>
    <td>B2</td>
  </tr>
  <tr>
    <td>A3</td>
    <td>B3</td>
  </tr>
</table>