Like our free content? Then you'll love our exclusive Club!
Divi Academy Membership gives you exclusive access to over 110 resources, including child themes, layouts, cheatsheets, tutorials, live training and member perks. And new content is added EVERY Monday!
Recipe #23 – How to Create a Scrolling Image Carousel in Divi is by far our most popular tutorial, and it has gone through a few interations, both to make it more user friendly if you want to customise it, and also to keep up with Divi updates. Rather than update that recipe again (there are some issues in Edge), I thought I would take a new approach.
A few months ago I decided I would officially declare no support for IE. Let’s face it, it’s always been a pile of 💩 and even Microsoft doesn’t support it anymore, so why should we? Plus, the single best thing about not supporting IE, is the world of opportunities it opens up for CSS. Namely, Grid and Variables!
Grid means we don’t need columns or floats, and Variables mean we don’t need to search through hundreds of lines of code to change values, keeping it super simple to modify for your needs.
So, in this recipe, I am going to show you How to Create a Scrolling Module Carousel in Divi using CSS Grid and Variables, which will work in all modern browsers across all device sizes. And the best thing? Because it uses Variables, the only thing you have to do is adjust a few numbers to make it work for however many modules you want to display in your carousel, seriously, that’s it!
And notice I said ‘modules’ and not ‘image’? That’s because this will work with (almost) any of Divi’s native modules. You can use an image, CTA, Button, Counter, Person, Testimonial, Blurb etc. etc., or a mixture of all of them.
The only modules you can’t use are the feed modules, so the Gallery, Portfolio, Blog & Shop modules. That’s because they already use a grid type layout and require some more work, but maybe I will get to that at a later date
So let’s get cooking!
Cooking time
Less than 15 minutes!
Preparation
For our prep we are going to set up the container. Create a new standard section on the page you want to display your carousel and add a single row. Open up the row settings and in the Sizing section of the Design tab, apply the following settings:
Make this row fullwidth = Yes
Use custom gutter width = Yes
Gutter width = 1
Then, in the Advanced tab, give the row a CSS Class of ds-carousel.
Now Save & Exit your row. Ok, that’s out prep done.
Method
Now, in your row add a new module. I am going to use the image module for this recipe, but as mentioned earlier you have the option of using any of the non-feed modules. Because we have set this row to have a gutter of 1, there will be no spacing between each module in the carousel. If you want spacing, then add left and right padding within the module itself. You can then make any other styling adjustments you wish.
Once you have your module set up how you want it, duplicate it for the number of modules you want in your carousel. I am going to go with eight, so my row will look like this:
Next, go into each module and swap out any content you need to. I have just added a different image for each module.
Once you are done there is a little more duplication to do. Duplicate each of your modules once, so you have two sets of your modules, all within the same row, like this:
Your second set of modules will need to be identical to the first set, this is what enables us to create a continuous scroll. So if you change anything in a module in the first set, be sure to make the same changes in the corresponding module in the second set.
Ok good, time for the fun stuff!
Now this CSS may look a little daunting if you are new to Variables, but don’t worry, I am going to explain everything and then you only need to edit a few values and you’re done.
If you haven’t heard of CSS Variables before or you aren’t sure what they are, they are simply a way to define the value of a CSS property in a single location, and then reuse that value throughout your CSS.
So for instance, you may use a colour multiple times within a stylesheet, but if you wanted to change that colour later, you would need to change every instance of it in your stylesheet. But with variables, you define that colour in a single location, and then just refer to that variable throughout your stylesheet, so when you change the value of that variable, it changes the colour everywhere. Cool eh?.
So first, let’s go over what we are doing.
Our first section is where we set variables for our carousel content, layout and speed. The rest of our CSS will refer to these variables and these are the only things you will need to change.
:root { --ds-module-number: 16; --ds-columns-desktop: 6; --ds-columns-tablet: 4; --ds-columns-mobile: 2; --ds-speed-desktop: 30s; --ds-speed-tablet: 30s; --ds-speed-mobile: 30s; }
We then set some device specific variables using calculations from the variables we set in our first section. This allows us to adjust the number of items shown on the screen and the speed of our animation for desktop, tablets and mobile.
@media all and (min-width: 981px) { :root { --ds-column-width: auto; --ds-module-width: calc(100vw / var(--ds-columns-desktop)); --ds-column-animation: calc(var(--ds-module-width) - (var(--ds-module-width) * 2)); --ds-scroll-speed: var(--ds-speed-desktop); } } @media all and (max-width: 980px) { :root { --ds-column-width: auto; --ds-module-width: calc(100vw / var(--ds-columns-tablet)); --ds-column-animation: calc(var(--ds-module-width) - (var(--ds-module-width) * 2)); --ds-scroll-speed: var(--ds-speed-tablet); } } @media all and (max-width: 479px) { :root { --ds-module-width: calc(100vw / var(--ds-columns-mobile)); --ds-scroll-speed: var(--ds-speed-mobile); } }
Next, we hide any overflow for our carousel to avoid a horizontal scrollbar. We then set the container to display as grid, allowing us to define the number of columns by pulling in the values from the variables we set in the first and second sections. We also define the width of each module from our variables.
.ds-carousel { overflow: hidden; } .ds-carousel .et_pb_column { display: grid; grid-template-columns: repeat(var(--ds-module-number), var(--ds-module-width)); width: var(--ds-column-width); -webkit-animation: scroll var(--ds-scroll-speed) linear infinite; animation: scroll var(--ds-scroll-speed) linear infinite; } .ds-carousel .et_pb_module { width: var(--ds-module-width) !important; }
This is our actual animation, we move the carousel from its starting position to its end position based on the values of the variables we initially set, and because we used ‘infinite’ in our animation settings above, it will continue indefinately.
@-webkit-keyframes scroll { 0% { -webkit-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(calc(var(--ds-column-animation) * (var(--ds-module-number) / 2))); transform: translateX(calc(var(--ds-column-animation) * (var(--ds-module-number) / 2))); } } @keyframes scroll { 0% { -webkit-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(calc(var(--ds-column-animation) * (var(--ds-module-number) / 2))); transform: translateX(calc(var(--ds-column-animation) * (var(--ds-module-number) / 2))); } }
And finally, (this section is optional), we pause the animation when the user hovers over our carousel.
.ds-carousel .et_pb_column:hover { -webkit-animation-play-state: paused; animation-play-state: paused; }
Copy all the CSS from the toggle below and paste into your Child Theme Stylesheet or Divi > Theme Options > Custom CSS.
Complete CSS
/*-----------------------------------------------*/ /*-----Scrolling Module Carousel by Divi Soup----*/ /*-----------------------------------------------*/ /*Carousel settings, adjust these values only*/ :root { --ds-module-number: 16; /*Your TOTAL number of modules, so if you have 8 modules duplicated, this number should be 16*/ --ds-columns-desktop: 6; /*The number of modules you want displayed at any one time on desktop*/ --ds-columns-tablet: 4; /*The number of modules you want displayed at any one time on tablet*/ --ds-columns-mobile: 2; /*The number of modules you want displayed at any one time on mobile*/ --ds-speed-desktop: 30s; /*The speed you want your carousel to move on desktop (increase value for slower, decrease for faster)*/ --ds-speed-tablet: 30s; /*The speed you want your carousel to move on tablet (increase value for slower, decrease for faster)*/ --ds-speed-mobile: 30s; /*The speed you want your carousel to move on mobile (increase value for slower, decrease for faster)*/ } /**************************************************/ /*You do not need to edit anything below this line*/ /**************************************************/ /*Variables for desktop*/ @media all and (min-width: 981px) { :root { --ds-column-width: auto; --ds-module-width: calc(100vw / var(--ds-columns-desktop)); --ds-column-animation: calc(var(--ds-module-width) - (var(--ds-module-width) * 2)); --ds-scroll-speed: var(--ds-speed-desktop); } } /*Variables for tablets*/ @media all and (max-width: 980px) { :root { --ds-column-width: auto; --ds-module-width: calc(100vw / var(--ds-columns-tablet)); --ds-column-animation: calc(var(--ds-module-width) - (var(--ds-module-width) * 2)); --ds-scroll-speed: var(--ds-speed-tablet); } } /*Variables for mobile*/ @media all and (max-width: 479px) { :root { --ds-module-width: calc(100vw / var(--ds-columns-mobile)); --ds-scroll-speed: var(--ds-speed-mobile); } } /*Hide the row overflow*/ .ds-carousel { overflow: hidden; } /*Define the grid and apply animation*/ .ds-carousel .et_pb_column { display: grid; grid-template-columns: repeat(var(--ds-module-number), var(--ds-module-width)); width: var(--ds-column-width); -webkit-animation: scroll var(--ds-scroll-speed) linear infinite; animation: scroll var(--ds-scroll-speed) linear infinite; } /*Apply the module width*/ .ds-carousel .et_pb_module { width: var(--ds-module-width) !important; } /*Define the animation*/ @-webkit-keyframes scroll { 0% { -webkit-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(calc(var(--ds-column-animation) * (var(--ds-module-number) / 2))); transform: translateX(calc(var(--ds-column-animation) * (var(--ds-module-number) / 2))); } } @keyframes scroll { 0% { -webkit-transform: translateX(0); transform: translateX(0); } 100% { -webkit-transform: translateX(calc(var(--ds-column-animation) * (var(--ds-module-number) / 2))); transform: translateX(calc(var(--ds-column-animation) * (var(--ds-module-number) / 2))); } } /*Pause animation on hover*/ .ds-carousel .et_pb_column:hover { -webkit-animation-play-state: paused; animation-play-state: paused; } /*-----------------------------------------------*/ /*---End Scrolling Module Carousel by Divi Soup--*/ /*-----------------------------------------------*/
The CSS provided is for a carousel of 8 items. 6 showing on desktop, 4 on tablet and 2 on mobile, all with a speed of 30s, this is the time it will take for our 8 modules to move completely across the screen.
When we set our carousel up, we created our modules, and then duplicated them once, so with 8 unique modules, we end up with a total of 16.
16 is the number you enter for the –ds-module-number variable:
--ds-module-number: 16; /*Your TOTAL number of modules, so if you have 8 modules duplicated, this number should be 16*/
The next 3 variables define the number of columns for desktop, tablet and mobile. If you resize the window in the demo you will see that the number of modules that fit on the screen on tablets and mobile is less than desktop, so these variables are where you define how many you want to show for different screen sizes.
--ds-columns-desktop: 6; /*The number of modules you want displayed at any one time on desktop*/ --ds-columns-tablet: 4; /*The number of modules you want displayed at any one time on tablet*/ --ds-columns-mobile: 2; /*The number of modules you want displayed at any one time on mobile*/
And finally the speed of the animation for different screen sizes. I have set these all to 30 seconds as I think its a reasonable speed that works well across device sizes, but I have added 3 options for you in case you want them to be different, just change the 30s value for each variable, increase it for a slower carousel and decrease it for a faster carousel.
--ds-speed-desktop: 30s; /*The speed you want your carousel to move on desktop (increase value for slower, decrease for faster)*/ --ds-speed-tablet: 30s; /*The speed you want your carousel to move on tablet (increase value for slower, decrease for faster)*/ --ds-speed-mobile: 30s; /*The speed you want your carousel to move on mobile (increase value for slower, decrease for faster)*/
And that’s it! You can use CSS Variables with literally any CSS property to make customising and changing your code quick and easy, and CSS Grid will open up a whole new world of layout options for you, check out my intro recipe to using CSS Grid with Divi here.
If you found this helpful please leave a comment and subscribe to my newsletter for all my latest Divi related content.
Michelle X
Hi Michelle – Thank you so much. I had used recipe 23, and it was not working, so I was happy to find out you published a new recipe. It is beautiful, well explained and it works.
I just tried this and it worked straight out of the block! thanks for a really useful guide (you can’t see my handy work yet as the page isn’t published!)
Hi Michelle
I’m getting parse errors (RBRACE required) in the root section and then some warnings on a few items after that. I’m running the most current version of DIVI on WordPress 5.0 with classic editor.
I can’t share my site – it’s in staging at this point.
Don’t worry, they are all false positives because the editors are not recognising more modern CSS properties. You can ignore them.
Thank you very much! What a great great way you have of describing the code that you are using. I appreciate it so much–Thank you!! Keep up the great work =)
Hi I am using this tutorial but i just have the first part the second part of images doesn’t show up
why is that?
I can’t tell you anything without a link to the issue.
Great tutorial, but I’ve found it does not work on Chrome for Android.
Is there a fix for this?
Hi,
Thank you for posting this tutorial! Love it! Works great in Chrome and Firefox… Except in the Safari browser the logos do not start to scroll until you mouse over the logos. Any advice? Thanks!
Hi Michelle, Is it possible for the images to be clickable, and when clicked on, the image expands?
I have looked at https://www.elegantthemes.com/blog/divi-resources/how-to-create-a-clickable-carousel-of-divi-modules however, I want to a moving/scrolling carousel like you have here, not one that people have to click to scroll.
Thank you
Yes, you can set the images to open in a lightbox in the modules
Hi Michelle,
Is it possible to have 2 different carousels with a different number of images on the same page? For example, I have 25 partner logos and 10 certification logos I would like to have on an About page but I would like to showcase them separately.
Yes, you just need to duplicate everything and create unique classes for the second carousel
Thanks! It’s the initial part with :root that kind of confuses me.
If, for example, I give it a class .certification, would the code be:
:root {
–certification-module-number: 16;
–certification-columns-desktop: 6;
–certification-columns-tablet: 4;
–certification-columns-mobile: 2;
–certification-speed-desktop: 30s;
–certification-speed-tablet: 30s;
–certification-speed-mobile: 30s;
}
You need to change the whole class name everywhere, So if it is ‘ds-speed-desktop’ for example, change it to ‘ds2-speed-desktop’ and change every instance.
Dear Michelle, kindly, can you make a video teaching how to set this up with 12 or more images, because this example is only with 5 images, in my case are 12 images – how to with only 5 images —> https://divisoup.com/how-to-create-a-scrolling-image-carousel-in-divi/
I’ve already made this as simple as I possibly can using variables so you only have to edit values in a couple of places to adjust for the number of images you want to show. I’m sorry but I don’t think I can add any more to this one
Michelle – I’m getting 17 Expected REBRACE errors using the copied code. Is it most update to date and is there something I can fix?
They are false positive because the code editor is outdated, you can ignore them there is nothing wrong.
Is there a way to have this same, basic carousel for two carousels on the site, different carousels on two different pages? I can duplicate and rename the variables, but the “@-webkit-keyframes scroll” and “@keyframes scroll” elements in the CSS are not specific to ds-carousel so not sure how to duplicate.
They are specific, they are using variables within the keyframes, so you need to change those also.
Thank you so much! This is really great!
Hi Michelle, Thanks for giving the community this code….
I noticed that sometimes the images don’t load in the carousel and instead display vertically at a large size down the page. This can happen in Chrome but also on a client’s monitor (embarrassing!) and on a test in Browserstack. My original media images are sized to 300 pixels. Should I make them smaller? When they do display correctly, they are at the size I want. My website is https://perugicom.
Thanks!
The link is not working for me
Great tutorial – fast and easily done. Works perfect – Thanks!
Hey Michelle! I love you!!
Dear Michelle,
Thank you so much! It works perfect!
Is it possible to – when we click on some logo – open it like a gallery, and quickly go through the logos, without waiting for it to scroll alone.
Thanks!
You could modify it to work with the gallery module
OMG!!! Spent all morning messing with a plug-in that I PAID for. Took a few minutes to set this up and it works great – unlike the plugin.
thanks it works!!! divisoup no limits
What a great tutorial. Not only do i now have a smooth scroller i have learned what css variables are.
Great stuff
Thank you for this tutorial! It was easy to follow and set up. It looks great on the site that I’m building.
Welcome Rod
Hi Michelle Brilliant, easy to use and worked first time on my desktop Firefox and Chrome but does not scroll on Edge although looks pretty with six images across the page. On tablets it works on my ipad 2 but on my iPad 1 it shows all 18 images (I’m using 9 images and have changed the variable from 16 to 18) in a vertical row at the left of the page and that’s using both Safari and FF on that device. On my iPhone 8 it’s great!! Just wondering if you have any ideas for Edge and any thoughts… Read more »
Wow! Very nice, simple, clear, clean and useful tutorial. It could be nice to add to the scroll function. You could give some suggestions? Thankyou in advice
There are some good plugins that can do that already
Great tutorial, thanks! All my logos are the same height, but vary in width – however, when displaying on my page, some logos are being shrunk both vertically and horizontally to fit an image container that is the correct height of my source images (58px).
See here, https://drive.google.com/file/d/18YyyqiOO34ueHk5ddwMIZRblGKjXdOZ-/view?usp=sharing, the Syracuse logo should be the same height as the others (which would make it much wider – that’s OK). TIA!
This is because of the variables that are defined in the CSS to show on the screen at any given time. Everything is dependent upon those values, so edit with care. When I have worked with college/university logos in the past myself for things like this, I just created png images that were the same size for each one. Saved me a lot of headache and no coaches could complain about playing favorites…everyone got the exact same amount of space
Thank you!
Yeah. If they are not uploaded consistently in height and width the will get resized to fit the area and look really bad. I had to not use it on one site because I didn’t want to take the time to resize and re-upload the logos again.
This is a great site for bulk resizing https://birme.net
Great! I will check it out.
Just brilliant! Simple, clear, clean, fantastic tutorial; thank you so much for sharing your knowledge
Thank you for this Michelle, I love this revolving carousel! it’s fabulous.
I’m designing a site and this carousel looks great on Safari and Firefox.
I can see you have had comments here about IE, is there any update on when you might get the code worked out for this?
FYI – I feel so rude asking as you have offered free coding! it’s just frustrating that I can’t use it whilst it doesn’t work on a main browser
IE is a depreciated browser that has not been supported for quite some time now. No additional code will be provided for it in any tutorials.
Thanks for this information Shay, I’ve only every used Safari on a Mac so don’t know much about IE.
I do have another problem with the carousel though but only on Chrome. I’ve loaded up 10 images and only 4 show. The others come up with the file name and when you click on them it says won’t load. I’ve checked all the images and they are all the same jpegs and very small files. Do you have any suggestions on why this might be happening?
Sounds like the files may be corrupt or something went wonky when uploading. This happens sometimes with WordPress. I would delete them and try uploading again. After that, test the image URL to be sure they open properly. If they do, you should be good to add them back to the carousel.
Seems like there is errors showing in the CSS in the Divi Custom CSS. Says RBRACE is expected with –ds-column-width: auto; If I remove one of the hyphens in front of “ds” then the error goes aways. So do I ignore the error?
WordPress does not recognize some CSS – you can override it at the bottom
What do you mean override? You mean just ignore it?
Correct – it is the only option at the bottom if you are using the WordPress editor with your stylesheet.
Ok. Well I’m using the Divi CSS editor and it’s flagging it as a red “X”. The warning I ignore but wasn’t sure. It works anyways. Just curious.
CSS changes by the day it seems – they just haven’t caught up their validation rules, which is understandable.
Hi Michelle,
Is it possible to make the carousel run only on hover?
Thanks a lot for your reply!
You can try adding :hover to the designators
Michelle, I’m a little late in commenting but wanted to thank you for this fantastic Divi based “tool”. It worked great on a site was I working on that had multiple partner logos just stacking up in rows and columns. Thanks so much for making this available.
Awesome tutorial! For some reason, on my website, the grid is not responsive though. I copied the code into my child theme, left it “as is”. I get the same number of modules displayed independent of device (so it’s one long row of logos displayed on phone as well, instead of stacked columns). What could be the reason? Thank you!
It looks correct from my end
Hi Michelle,
Thanks for the tutorial! Slider is working.
I got a question I cannot figure out. I would like to add another slider with less modules.
What should I change so the CSS select the right slider?
There is no need to change anything to use less modules, but if you are using only a few, there is no reason to have a slider.
Can you make the logos grayscale, but then colored on hover/click? I really like this slider.
You can use CSS and an after pseudo-class to display a different image on hover, but you will need to define a separate class to each image and ensure they are the exact same size. For example, the code below is for the Ford logo at the bottom of the page at https://isystemsweb.com:
.ford a:after {
position: absolute;
content: url(/wp-content/uploads/2018/05/ford-logo-color.png);
background: #fff;
background-size: cover;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0;
transition: .5s ease all;
}
.ford a:hover:after {
opacity: 1;
}
Hello ! Thank you so much for your amazing tutorials. I used your json layout from this tutorial ( the scrolling module carousel: https://divisoup.com/how-to-create-a-scrolling-image-carousel-in-divi/ ) and works very good ! but i realized there’s a bug on the left when we come to the end of the animated rows (the images get cropped on the top and if you reduce de window there’s like a white rectangle that appears behind them or cut the image on half sometimes). Do you have any idea why is this happening? am i doing something wrong? here the website: http://231e47.com/accueil-cf/ Thank you so much… Read more »
The link is to a 404 page. Did this happen when you were just resizing the screen on your computer, or did you observe it on actual devices?
Hi Michelle, in case I need 16 images the “–ds-module-number” should be 32? I try it but the speed increase so I return to 16 In the DIVI module, I create 16 images and duplicate to 32 in the same section Not sure if I understand the programming logic correct, my carousel is working nice but the problem is now in the transition. ————————————- :root { –ds-module-number: 16; /*Your TOTAL number of modules, so if you have 8 modules duplicated, this number should be 16*/ –ds-columns-desktop: 8; /*The number of modules you want displayed at any one time on desktop*/… Read more »
You’ll need to lower the 32s value to slow it down or increase to speed it up
Hi,
Is it possible to apply this to blog module ( grid ) to create sliding blog posts? like sliding little cards with read more buttons?
I tried replacing image modules and it almost worked. But I couldn’t figure how to reduce space between two cards.
You can use the blog module, but you’ll need to ensure you have properly sized images and will likely need to adjust the padding and width of each.
Hi Michelle, Great tutorial. I created the scrolling carousel in draft format in my Divi Theme. The page itself works awesome and scrolls beautifully. However, when I go to place it in my homepage, within a new section….the images just stack-up vertically with no scrolling effect. I go back to my Slider Carousel Page draft and it works fine. I saved that section globally to be able to place within my website…but it still does not scroll when I place it live within my site, I think I am missing a step, would you be able to assist? I’ve taken… Read more »
Sounds like you’re maybe not adding ds-carousel to the row class correctly – if you can place back on your site and share a link here we can look. Unfortunately, we can’t install this for you.
HI Michelle
Have you tested this with Microsoft Edge
Yep, and it was working fine until the Edge update! I have that on my list to look at, just need to update Windows
Thanks for that. Can you update me when you have a fix.
Best of luck on the windows update (you may need it)
Haha, will do Paul, I am trying to fit in in today
Just done some tests the css translateX command does not work with variable values in Edge but is fine in Firefox
Hi Michelle,
very nice work!
But it only works in Firefox and Chrome, not in Edge and neither Internet Explorer…
Thank you!
See previous posts for comments on Edge. We do not support IE at all
Works fine on edge for me!
Hi, I love this carousel…it works perfect. I am having an issue on IE with it. It stacks the images vertically along the side. Is there a work around for this?
Thank you!
Please see previous comment here Tim https://divisoup.com/r41-how-to-create-a-scrolling-module-carousel-in-divi/#comment-6216
Nice work, and if you have different logo sizes you could add this to align to center, add “justify-content: center;” and “align-items: center;” to .ds-carousel .et_pb_module { }
Voila your logo’s is centered
.ds-carousel .et_pb_module {
width: var(–ds-module-width) !important; display: flex;
justify-content: center;
align-items: center;
}
Yep, thought I included that but obviously didn’t lol, thanks for adding!
Fabulous Michelle, I love your recipes. This is going to be SO useful, I can’t wait to get cooking!
Awesome, thanks Sarah
Hi, not sure what went wrong but I couldn’t get mine to work. I have a link to my home page, (i used all the same image to test it) but it didn’t work.
Looks like you are actually using the code from R23 and not this one, that code doesn’t work anymore
VERY COOL!
Thank you for taking the time to write this code!
I got it working on my site. It looks great displaying all my certifications.
Mine does seem to jump back to the beginning. Any clues on how to make it a smooth transition or is that just the way this works?
Thanks again,
Eric
Nope it should be a nice smooth continuous scroll, likely you have got the values wrong in the variables but without a link its impossible to say.
Very good recipe !
I just have a little question, how can I reduce the size of images ?
Thank’s a lot
Just add padding in each module
Thank you Michelle! What amazing work! I’m learning so much with you.
Could this code be modified to manually use the scroll on the mobile without the animation?
Thanks Laura
Not this code, but you might want to take a look at this post I wrote for Elegant Themes https://www.elegantthemes.com/blog/divi-resources/how-to-create-a-clickable-carousel-of-divi-modules
Hi Michelle,
This was so easy!
I’m showing web site examples and want the images to be larger. Do I use fewer images across?
If you need them to be larger, just reduce the number of modules that display at any one time by changing the values in these variables:
–ds-columns-desktop: 6;
–ds-columns-tablet: 4;
–ds-columns-mobile: 2;
This is a great addition to your original post! Thank you!
One question – i set the speed to 60 seconds and it’s still a little too fast. I have a ton of modules (78 total). Is there a way to make it even more slower?
Yes, just keep increasing until you get the speed you want, 60s is 60seconds so try 120s etc.
Is it any possible modification to CSS that don’t stop the scrolling when hover over the items?
Sure, just remove this section of CSS
.ds-carousel .et_pb_column:hover {
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
fantastic! I have looked all over the web for an easy solution and you have provided. Appreciate all your work and thanks!
That’s great, thanks Terri
Awesome tutorial but is it possible to have a scroll icon on both sides? like a testimonial slider.
That kibnd of defeats the purpose of the effect, but you can check this post out I wrote for Elegant Themes which may suit you better https://www.elegantthemes.com/blog/divi-resources/how-to-create-a-clickable-carousel-of-divi-modules
Hi Michelle, thanks for the tutorial but every time I paste some kind of CSS code my Divi is returning some error message such as
“Expected RBRACE” or “Expected ( | etc…
I’m sure the problem is not your code because the same problem happens if every CSS code I try and I’m getting very frustrated.
Have any idea what’s going on?
Sorry to ask this you already give a huge help written this tutorial.
The code pasted it’s exactly the same as on “complete CSS” section on “Divi > Theme Options > Custom CSS”
Regards
Fernando you don’t need to worry about it, they are false positives. The editor doesn’t recognise variables as valid CSS as they are fairly new, but its all fine
this is very nice work! thank you! Is it possible to get the items to scroll in the opposite direction?
Sure, you can just change the animation direction, so find these properties:
-webkit-animation: scroll var(–ds-scroll-speed) linear infinite;
animation: scroll var(–ds-scroll-speed) linear infinite;
And change to:
-webkit-animation: scroll var(–ds-scroll-speed) linear infinite reverse;
animation: scroll var(–ds-scroll-speed) linear infinite reverse;
Michelle, that was some awesome CSS wizardry. Great tutorial, and as advanced a CSS user as I am, I learned some new stuff. Thanks and you can check the my site out with the scrolling logos toward the bottom.
Looks great Matthew and glad you could make use of it