Dragon Dragon - 1 month ago 6
CSS Question

Emulating COLSPAN with CSS without ending the previous TR

Not sure if this is possible:

I want to use datatables to manipulate my table, but I want the table rows to effectively run over two lines in the table as they have a lot of embedded text:


+---+----+----+----+
| A | 12 | 33 | 55 | }
+---+----+----+----+ } This is one row
| A is a vowel... | }
+---+----+----+----+
| B | 22 | 54 | 11 | }
+---+----+----+----+ } This is a second
| B is a consonant | }
+---+----+----+----+


(excuse my ASCII art).

Is there a good way of doing this in CSS?

Answer

Datatables doesn't support colspan in the body, i usually handled cases like yours by showing a button and then presenting extra data like in this example