I want to vertically center the divs inside col-md-12
. This is the structure:
.list-item {
border-bottom: 1px solid #e7e7e7;
float: left;
padding: 15px 0;
width: 100%;
}
.list-item img {
width: 60px;
height: 60px;
}
.col-md-2 {
float: left;
width: 16.66666667%;
}
<div class="list-item col-md-12 clearfix">
<div class="col-md-1">
<img class="img-circle" src="https://aframe.io/aframe/examples/_skies/puydesancy.jpg">
</div>
<div class="col-md-2">
<strong>
<a href="#/buildings/1">Central park</a>
</strong>
</div>
<div class="col-md-5">
<span>The description for central park description for the central park</span>
</div>
<div class="col-md-2">
<span>Category count:</span>
<strong>3</strong>
</div>
<div class="col-md-2">
<span>Panorama count:</span>
<strong>7</strong>
</div>
</div>
I tried: vertical-align: middle
and display: inline
but it didn't work. Is there another way?
Here's the JSFiddle: https://jsfiddle.net/wLgfLo3L/
(You need to resize the browser to full screen).