How do I remove the numbers from featured collections when swiping on mobile or smaller devices?
My store URL: https://hyz8484lh6daf9h3-57645498523.shopifypreview.com
A user seeks to remove pagination numbers from featured collection sliders on mobile devices in Shopify’s Dawn 2.0 theme.
Solution Provided:
base.css to hide slider buttons/numbers on screens under 750px width.collection.slider-buttons with display: none !importantAdditional Customizations Requested:
Implementation Details:
rgba(255, 255, 255, 0.7))Outstanding Issues:
Note: Code snippets in the thread appear reversed/encoded but contain CSS for positioning slider buttons and hiding counters.
How do I remove the numbers from featured collections when swiping on mobile or smaller devices?
My store URL: https://hyz8484lh6daf9h3-57645498523.shopifypreview.com
Hi @GG9 ,
@media only screen and (max-width: 750px) {
.collection .slider-buttons {
display: none !important
}
}
@made4Uo Thank you! Is there an easy to way add an arrow to the image itself that looks like that too?
Hi @GG9 ,
If you want to show the buttons on the side, please delete the previous code provided and replace with the code below.
Note: For the slider to work, you must assign more than 4 products
.collection .slider-button.slider-button--prev {
position: absolute;
top: 50%;
left: 0;
transform: translateY(-150%);
z-index: 20
}
.collection .slider-counter.caption {
visibility: hidden; !important
}
.collection .slider-button.slider-button--next {
position: absolute;
top: 50%;
right: 0;
transform: translateY(-150%);
z-index: 20
}
@made4Uo Thanks a lot! Do you know how to properly set the position? On desktop devices, the arrows are on the very outside and on mobile devices the arrows are in the mid of two images. I already added the code on my website if you could check that: https://hyz8484lh6daf9h3-57645498523.shopifypreview.com/
Hi @GG9
Please add the code below.
.grid__item.slider__slide:first-child {
margin: 0 !important
}
.collection slider-component {
margin: auto 5vw !important
}
Since buttons will be on top of the image, I would recommend adding background to show contrast. Add the code below if you agree.
.collection .slider-button {
background: rgba(255, 255, 255, 0.7) !important;
}
Also, please be aware that the code for “.collection .slider-button.slider-button–prev” should be left: 0. I am seeing left: -50;
@made4Uo Thanks, works more than great! Is there some way to add the exact same thing to multicolumns sections and product pages?
This didn’t work for me. Are you able to help? Thanks!
My store is www.nyudswim.com