缩放浮动div在同一高度

时间:2013-07-04 12:15:13

标签: css

我有这个HTML:

<div class="exwrap">
    <div class="listpages"> </div>
    <div class="excerpt"> </div>
</div>`

和css:

.listpages {
    width: 28%;
    float: left;
    height: 100%;
}

.excerpt {
    width: 70%;
    float: right;
    height: 100%;
}

我希望.listpages和.excer具有相同的高度,但这只有在我有.exwrap固定高度的情况下才有效,但我需要具有动态高度,而较小的高度则需要较大的高度。< / p>

感谢。

1 个答案:

答案 0 :(得分:0)

浮点数不可能,但表格单元格(demo)可以使用

.listpages {
    width: 28%;
    display: table-cell;
}

.excerpt {
    width: 70%;
    display: table-cell;
}
相关问题