Skip to content Skip to sidebar Skip to footer

Img-responsive Doesn't Center

I need some help. img-responsive doesn't centers with this code. div.container-main { margin-left: auto; margin-right: auto; text-align: center; } Then the HTML cod

Solution 1:

This is a pleasantly easy fix. Because .img-responsive from Bootstrap already sets display: block, you can use margin: 0 auto to center the image:

.img-responsive {
    margin: 0 auto;
}

Post a Comment for "Img-responsive Doesn't Center"