How can a

前端 未结 11 1070
余生分开走
余生分开走 2020-12-30 19:20

Here is the relevant code (doesn\'t work):



testing td checkboxes



Some column title Another column title
Value 1
(a bit more info)

The main trick here is to define the height of the rows so we can use a 100% height on their children (the cells) and in turns, a 100% height on the cells' children (the labels). This way, no matter how much content there is in a cell, it will forcibly expand its parent row, and its sibling cells will follow. Since the label has a 100% height of its parent which has its height defined, it will also expand vertically.

The second and last trick (but just as important) is to use a CSS hack for the min-height attribute, as explained in the comments.

Hope this helps !

提交回复
热议问题