need help centering bootstrap carousel image


I am having trouble making the image centered in the slider.

Please see my carousel here

it is created using react-bootstrap with next.js

for centering image I’ve tried adding to image tag

margin: 0 auto 

to both image and carousel-item


Possible Solution

To center inline HTML elements, add text-align property to center to it’s parent block element.

Below CSS rule will centre the images in the slider.

.carousel-item {
    text-align: center;

Answered By – kantbtrue

Answer Checked By – Robin (AngularFixing Admin)

Leave a Reply

Your email address will not be published.