need help centering bootstrap carousel image

Issue

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

Please see my carousel here
https://wordpress-website-headless-v2-c9jivybjd.vercel.app/

it is created using react-bootstrap with next.js

for centering image I’ve tried adding to image tag

.center-block 
margin: 0 auto 

to both image and carousel-item

Solution

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.