Code not working on mobile. Code is working on desktop and mobile preview.

Code not working on mobile. Code is working on desktop and mobile preview.

swellsport
Visitor
3 0 0

Looking for some coding help. On the desktop view, im looking to just have the collection name showing in the middle image, not showing in image 1 and 3 as it is currently.

 

With mobile, the preview currently shows it in the middle of all 3 images that are in a swipe. This is perfect and what i am looking to design, although when loading the mobile site on my mobile, the collection names are in the default location below the images. Any help appreciated.

 

This is the code currently.

.collection-list .card > .card__content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: red;
border: 0px solid red;
width: max-content;
padding: 0 1rem;
}

.collection-list h3.card__heading {
color: gray;
}

.collection-list .card__heading > a > span.icon-wrap {
display: none;
}

swellsport_0-1718694944792.png

swellsport_1-1718694974934.png

 

 

Replies 4 (4)

Dev-Brad
Shopify Partner
22 0 0

Hey @swellsport 

 

Would love to help out further, did you have a link to the preview theme or site so i can inspect a little further for you? 

7+ Years as an expert Shopify Developer | Message for a free 15 mins consultation
swellsport
Visitor
3 0 0

Hi Brad, This is the spotlight theme. 

 

the url is

swellsport.com.au

 

Password 

Swell101

swellsport
Visitor
3 0 0
Dev-Brad
Shopify Partner
22 0 0

Hey @swellsport 

 

I took a further look and it looks like a bit of CSS will need to be moved around to make sure that on desktop, only the second tile shows the "chasing the swell" Text and link, and then on mobile it still shows in the middle of the image for all of them instead of below

 

Ideally we would add a few extra inputs into the theme customiser so you can keep the functionality for both options  and not risk creating bugs in the section making it unusable or buggy for customers 

 

I've sent you a message through the contact form, hopefully I can help out further maybe over a call or something

7+ Years as an expert Shopify Developer | Message for a free 15 mins consultation