我在父框中获得了2个div。垂直对齐2个不同大小的div
我想让上面的那个取70%的父盒子,第二个30%。 我不想使用绝对位置。
任何想法?
**********************
* top div *
* top div *
* top div *
* top div *
* top div *
* top div *
**********************
* bottom div *
**********************
编辑: 父盒子是浮动的,
#mright {
width : 45%;
float:right;
margin-right: 5%;
}
的位置,但它打破了整体设计。我也尝试过使用填充和边距,但如果上层潜水中的内容发生变化,设计再次破裂,表格单元格和框线对齐就不要这样做。 – shultz
#topDiv {width:100%;身高:70%; } #bottomDiv {width:100%;身高:30%; } –
我希望,但它也行不通,两者只是相互碰撞。 – shultz