O
O
One_guy2019-03-16 14:25:15
css
One_guy, 2019-03-16 14:25:15

How to scale down an image proportionally in owl carousel 2.3.4?

When adding an image in owl carousel 2.3.4, it stretches to full screen width. When you try to decrease the width from 100%, the image shifts to the left. Below I indicated where I change the width.
.owl-carousel .owl-item img {
display: block;
width: 100%
Please tell me how to reduce the image proportionally, while leaving it in the center. Is it possible to get by with CSS changes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-03-16
@One_guy

add imagemargin: 0 auto;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question