Adjusting space between images in carousel
-
wrote on Feb 21, 2020, 2:58 PM last edited by
I want to set up a carousel going from one side of the screen to the other and am wondering if there is a way to adjust the spacing between the images? I don't want them to touch directly.
-Anders
-
-
wrote on Apr 1, 2020, 10:26 PM last edited by
@Anders @mariusjopen Adding the following CSS did the trick:
.lay-carousel-wrap.show-multiple-slides .lay-carousel-slide img, .lay-carousel-wrap.show-multiple-slides .lay-carousel-slide video { padding-right:1%; }
-
Dear @studioworkhorse
Ah great! Thank you for sharing and using LayTheme!
Best!
Marius -
wrote on Mar 25, 2025, 10:45 AM last edited by
That didn't work for me, but here is my solution, if you have single slides:
.lay-carousel-slide.is-selected { margin-left: 3%; left: -3%; } .lay-carousel-slide.swiper-slide-prev { left: -3%; }
The numbers you can change to your liking, but they should all be the same.
-
-
wrote on Mar 31, 2025, 3:26 PM last edited by
Yes, but that option isn't visible when "Aspect Ratio of first Element" is selected. Maybe you can change that?
-
when using "aspect ratio of first element"
only one image at a time is shown:
the currently non existing space between images is just shown during the sliding animation.
i will show the "space between slides" setting for this case too with the next lay theme update.
i just tested it and it seems to work fine.
-
wrote on Mar 31, 2025, 3:35 PM last edited by
Cool, thanks!!
Yes, it is only shown while sliding. It is a detail, but it bothered me, especially because I had rounded corners on the images :)
I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it