maxmarinich / react-alice-carousel

React responsive component for building content galleries, content rotators and any React carousels
MIT License
842 stars 92 forks source link

how to move dots in image? #270

Closed mohammad-hassani closed 1 year ago

mohammad-hassani commented 1 year ago

Hello, I wanted to know if there is a way to move the dots in the photo?

I wrote this code for custom dots

const renderDotsItem = ({ isActive }) => {
    return isActive ? 
        <div className="w-8 h-3 mx-1 bg-white rounded-full"></div> 
    : 
        <div className="w-3 h-3 mx-1 rounded-full bg-battleship-grey"></div>;
};

and when I add the ‍‍‍‍absolute class with bottom-32 (for example), all the dots placed on top of each other

mohammad-hassani commented 1 year ago

OK I added this class

.alice-carousel__dots {
    position: absolute;
    bottom: 60px;
    width: 100%;
}

to my app.css file and every thing is fine now