div height:100%; not working with display:table-cell;

前端 未结 3 1141
闹比i
闹比i 2021-01-04 05:10

My code was working when




<         


        
3条回答
  •  佛祖请我去吃肉
    2021-01-04 05:55

    Having div.table > div.table-row > table.table-cell with height of its container is a bit tricky thing. One of the easiest way is that you can add

    .table {
        position: absolute;
    }
    

    in this case if you will add

    .table {
        height: 100%;
    }
    

    That will fit its parent height.

提交回复
热议问题