中间菜单部分代码结构样式如下。求问为什么price浮不起来?(只靠右,但是上面还是有h4和p挡着)
<div class="menu contatent"> <div class="menu-title">The Menu</div> <ul class="menu-list "> <li class="item"> <a href=""> <h4>Voluptate cillum fugiat.</h4> <p>Cheese, tomato, mushrooms, onions.</p> </a> <span></span> <div class="price">$50</div> </li>
.menu-list{overflow: hidden;width: 1214px;} .menu-list .item { float: left; width: 492px; margin:60px 114px 0 0; height:36px; display: block; } .menu-list .price{float:right;}
<div class="item_left" style="width: 300px; float: left;">
<a href="">
<h4>Voluptate cillum fugiat.</h4>
<p>Cheese, tomato, mushrooms, onions.</p>
</a>
<span></span>
</div>
<div class="price">$50</div> 加个div 左浮动 也可以把price的内容放在p标签里面,加float:right