我有三個<div>
這樣的:事業部垂直對齊
<div class="col-xs-12 col-md-4 ">
<img src="custom_images/logo3.png" />
</div>
<div class="col-xs-6 col-md-4 text-center">
<div class="input-group">
<input type="text" class="form-control header_search" placeholder="Search Here....." aria-describedby="basic-addon1">
<span class="input-group-addon search_span" id="basic-addon1" ><i class="fa fa-search "></i> </span>
</div>
<%--<div class="">
<input type="search" placeholder="Search Here...." />
<span style="background-color:#000;padding:10px;">
<img src="custom_images/search.png" /></span>
</div>--%>
</div>
<div class="col-xs-6 col-md-4 text-right">
<button class="cart_button"><span>Items in your cart</span> <span style="margin-left:25px;"><img src="custom_images/cart_item.png" /></span></button>
<span class="cart_items">15</span>
</div>
我不能垂直對齊他們在一條線上。我希望他們都像vertically-align: middle
。
這裏是如何看現在:
請幫我這個。
[在一個div元素的垂直取向]的可能的複製(http://stackoverflow.com/questions/79461/vertical-alignment-of-elements-in-a-div) – Jivings
@Jivings Nopes,不相關。 –