I am currently using Bootstrap version v4.0.0-beta.3 and facing a challenge with aligning an image in the absolute center of a fixed-height div tag. While I have successfully aligned the image horizontally using the mx-auto
and d-block
classes, I am struggling to achieve vertical alignment despite trying various methods suggested on platforms like this and this. The following is my code snippet.
.border-section {
border: 2px solid #D0D0D0;
margin-top: 20px;
}
<div class="container">
<div class="row">
<div class="col-sm-3 mr-4 border-section" style="height:290px">
<img class="mx-auto d-block img-fluid" src="http://tech21info.com/admin/wp-content/uploads/2013/03/chrome-logo-200x200.png" alt="View">
</div>
</div>
</div>
Seeking assistance for this issue. Can anyone please help?