height: 100% for
inside
with display: table-cell

后端 未结 7 1419
醉话见心
醉话见心 2020-11-29 21:44

Here is 2 column markup using display: table and display: table-cell CSS declarations:

相关标签:
7条回答
  • 2020-11-29 22:50

    Define your .table and .cell height:100%;

        .table {
            display: table;
            height:100%;
        }
    
        .cell {
            border: 1px solid black;
            display: table-cell;
            vertical-align:top;
    height: 100%;
    
        }
    
        .container {
            height: 100%;
            border: 10px solid green;
    
        }
    

    Demo

    0 讨论(0)
提交回复
热议问题