I am using Swiper Library to create carousel. i want to center my card element in center but i am not able to do. here is important component code please help me. i am using styled component with swiper library.
const Wrapper = styled(motion.div)`
height: 200px;
min-width: 300px;
width: 300px;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
position: relative;
&:hover ${Desc} {
transform: translateY(0%);
}
`;
const Card = () => {
return (
<Swiper pagination={true} modules={[Pagination]}>
{sliderItems.map((item) => {
return (
<SwiperSlide key={item.id}>
<Wrapper>
<Title>{item.title}</Title>
<Desc>{item.desc}</Desc>
<Img src={item.img} />
</Wrapper>
</SwiperSlide>
);
})}
</Swiper>
);
};
why my Wrapper div take this extra space. because of that next element is not visible on screen.