I am trying to center an image on the page, but it only works for mobile screens because I put col-xs-12
for <img>
tag. Is there any problem in this class:
col-md-6 col-xs-12 img-responsive text-center
I tried to put margin: 0 auto
to <img>
and to .pict
div, but it doesn't work. Also, I've tried center-block
class and text-center
.
<div class="container" style="width: 100%">
<div class="pict" style="width: 100%">
<div class="img-pict" style="margin: 0 auto">
<img src="../img/CoverCNVol1No1.png" class="col-md-6 col-xs-12 img-responsive text-center">
</div>
</div>
</div>
The image is standing on the left side, it should be at the center of the screen.