I'm trying to vertically align center a div in bootstrap <header>
but it does not work (please before voting down visit JSFiddle link!):
<div style="display: table-cell; height: 50px; vertical-align: middle;">
<button type="button" class="btn btn-default navbtn">
<span class="glyphicon glyphicon-leaf"></span>
</button>
<button type="button" class="btn btn-default navbtn" >
<span class="glyphicon glyphicon-cog"></span>
</button>
<div id="navbar-search">
<button type="button" class="btn btn-default navbar-search-btn" >
<span class="fa fa-search"></span>
</button>
<input type="search" class="navsearch" />
</div>
</div>
When I remove navbar-search
div buttons are fine.
JSFiddle: http://jsfiddle.net/maysamsh/Rp94k/1/
Note: Search container has display:inline-block;
and makes it stick to the top, I can't remove it.