How do I make a div fill an entire table cell?

前端 未结 6 2275
日久生厌
日久生厌 2020-12-09 18:26

I\'m trying to fill the center cell of a table with a div element. For the purposes of illustrating the problem, the div is styled with a red background. It seems to work

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 19:13

    Here's a jsfiddle: https://jsfiddle.net/55cc077/pvu5cmta/

    CSS height: 100% only works if the element's parent has an explicitly defined height. This jQuery sets the table cell height in the first column.

    
    

提交回复
热议问题