Jump to content

Scroll instead of arrows for card carousel section on mobile

Recommended Posts

Site URL: https://www.venturacoach.com/why-coaching

I have a card carousel section in several pages on my website and they display fine on desktop but when I go to mobile I have to click an arrow to scroll through them and I want the cards to be displayed when I scroll down (vertically) instead of having to click an arrow. Does anyone have code for this? I've seen some code for blog posts but not for carousels. 

Thanks!

Link to comment
On 1/13/2022 at 5:32 AM, kayla13 said:

Site URL: https://www.venturacoach.com/why-coaching

I have a card carousel section in several pages on my website and they display fine on desktop but when I go to mobile I have to click an arrow to scroll through them and I want the cards to be displayed when I scroll down (vertically) instead of having to click an arrow. Does anyone have code for this? I've seen some code for blog posts but not for carousels. 

Thanks!

Add to Design > Custom CSS

/* list carousel on mobile */
@media screen and (max-width:767px) {
ul.user-items-list-carousel__slides.user-items-list-carousel__slides--initialized {
    display: block !important;
}
li.user-items-list-carousel__slide.list-item.list-item-basic-animation {
    transform: unset !important;
    margin-bottom: 20px;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Thank you!! This worked great. I added the below to remove the arrows on mobile as well.

 

/* list carousel on mobile */
@media screen and (max-width:767px) {
ul.user-items-list-carousel__slides.user-items-list-carousel__slides--initialized {
    display: block !important;
}
li.user-items-list-carousel__slide.list-item.list-item-basic-animation {
    transform: unset !important;
  margin-bottom: 20px;
  }
  .mobile-arrows {
    display: none !important;
}
}

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.