mhmd mhmd - 3 months ago 11
HTML Question

Bootstrap Z-index Image not working

How can with bootstrap using z-index to center the image at the middle and look like this image at pc phone and tablet without any problem?

enter image description here

.imglogo{
position: absolute;
z-index:1;
width: 300px;
}

<div class="row">
<img src="img/logo%20corner.png" class="center-block img-responsive imglogo">
</div>

Answer

Add the following to your css:

top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%)