由于设计页面需要,要把两个并排显示的div实现一样高的效果,n行n列布局,每列高度(事先并不能确定哪列的高度)的相同,是每个设计师追求的目标,那么如何纯css实现这样的效果呢?请看下面的代码
<pre lang=”html”>
<ul class="lp-tlist ptb5">
<li style="line-height:!important;border:solid 1px #d6d6d6"><dd class="lileft">2015年05月25日</dd><dd class="liright"> <a class="fcb" target="_blank" title="融信未来城" href="#">6#楼“六一”提前放“价”,直减600元/㎡sdfsad隧道发生大士大夫三大的说法撒旦发生大幅萎缩的发生的撒旦发射的而哇塞大范围试点范围撒旦法苏打粉,签约享1%购房优惠,截止5月31日。</a></dd><dd style="clear: both;"></dd></li>
<li style="line-height:!important;border:solid 1px #d6d6d6"><dd class="lileft">2015年05月08日</dd><dd class="liright"> <a href="#" title="融信未来城" target="_blank" class="fcb">目前3#楼4#楼6#楼9#楼在售,3#楼、4#楼为两梯四户格局,户型涵盖118㎡三房;6#楼王两梯四户格局,户型为76~144㎡二至四房,均价5300元/㎡。</a></dd></li>
</ul>
<style>
.lileft{
display: block; float: left; text-align: center; vertical-align: middle; width: 120px; border-right: 1px solid rgb(214, 214, 214); background-color: rgb(254, 254, 243); line-height: 50px;
}
.liright{
display:block; float:left; max-width:450px;padding:10px;
}
.lileft,.liright
{
padding-bottom: 32767px !important;
margin-bottom: -32767px !important;
}
@media all and (min-width: 0px) {
.lileft,.liright
{
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}
.lileft:before, .liright:before
{
content: '[DO NOT LEAVE IT IS NOT REAL]';
display: block;
background: inherit;
padding-top: 32767px !important;
margin-bottom: -32767px !important;
height: 0;
}
}
</style>
</pre>