Using "display: table-cell" is there a way to get the functionality of "colspan"?

With display: table-cell there a way to get the colspan functionality available when using real table cells?

In particular, I need some โ€œcellsโ€ to accommodate multiple columns.

Real tables are not possible because I am using a form layout for a row that will not be validated as a real table.

+42
css
Apr 05 '13 at 8:37
source share
1 answer

No, you cannot add colspan or rowspan to display: table-cell. This is one of the limitations of the table-cell function!

You can check the restrictions in this link.

http://www.onenaught.com/posts/201/use-css-displaytable-for-layout

If you want to include the COLSPAN function in a table cell, you must use the table-row-group and table-caption functions as follows

 display: table-caption 

and

 table-row-group; 

Check out this fiddle link: http://jsfiddle.net/ZQQY4/

+46
Apr 05 '13 at 8:40
source share



All Articles