I want to horizontally align center the div with the red border and vertically align middle the image. Vertically align middle is working but horizontally align center is not working. Here is my code:
.vcenter {
display: table-cell;
vertical-align: middle;
}
<div class="text-center" style="border: 1px solid black;padding-bottom:10px; width:100%;height:100%;">
<h2>xyz</h2>
<div style="height: 500px;width: 500px;border: 1px solid red; text-align: center; margin: 0 auto" class="vcenter center-block"><img src="" alt="Cinque Terre" width="304" height="236">
</div>
</div>