Skip to content Skip to sidebar Skip to footer

Colspan Doesn't Accept Decimal Numbers. How Do I Specify The Span?

Liquor Store Blues

Solution 1:

Because of your 4th row having 3 elements, your table actually has 12 columns, not 4.

http://cssdeck.com/labs/9lzcwolh

td {
  border: 1px solid;
}
<table>
    <thead>
        <th colspan="12">Liquor Store Blues</th>
    </thead>
    <tbody>
        <tr><td colspan="12">A1</td> </tr>
      
        <tr><td colspan="6">B1</td><td colspan="6">B2</td></tr>
      
        <tr><td colspan="4">C1</td><td colspan="4">C2</td><td colspan="4">C3</td></tr>
      
        <tr><td colspan="3">D1</td> <td colspan="3">D2</td> <td colspan="3">D3</td><td colspan="3">D4</td></tr>
    </tbody>
</table>

Solution 2:

For that row you can use the following HTML using a nested table:

<tr><td colspan="4">
  <table>
   <tr>
     <td>Meow</td>
     <td>Meow</td>
     <td>Meow</td>
   </tr></table>
</td></tr>

Post a Comment for "Colspan Doesn't Accept Decimal Numbers. How Do I Specify The Span?"