0
我不是全職的HTML人,但需要得到這個工作(如5%)。我有以下的佈局,看起來像這樣:html佈局 - 破格div
我不希望價格與頂部齊平,我在這裏使用的信息:Div collapse when using float。
我:
.menu-item {
border: 1px solid green;
}
.depth-1 {
margin-left: 10px;
}
.depth-2{
margin-left: 20px;
}
.menu-item .info{
width:400px;
}
.menu-item .info .header {
border: 1px solid orange;
}
.menu-item .info .detail {
border: 1px solid red;
}
.menu-item .price {
float: right;
width: 150px;
}
<div class="menu-item">
<div class="info">
<div class="depth-1 header">wakame-hijiki seaweed salad</div>
<div class="depth-1 detail">cucumber/carrot/daikon/apple || cucumber/carrot/daikon/apple/ginger dressing || cucumber apple/ginger dressing</div>
</div>
<div class="price">9.0</div>
<div style="clear:both;height:1px;overflow:none;"></div>
</div>
我將如何調整佈局,以獲得價格齊平頂部?
thx
它看起來只是做一個浮動:在信息上留下似乎修復它。用FF8進行測試 – timpone