Murso500 Posted December 10, 2020 Share Posted December 10, 2020 Site URL: https://guava-guppy-sx4w.squarespace.com/ URL: https://guava-guppy-sx4w.squarespace.com/ PW : test Hi, I've been able to follow a number of forum topics on this subject but cant seem to get the code to work. Have two backgrounds set on the home page, would like to hide the landscape one in mobile and the portrait one in desktop / tablet modes. Tried to locate the section ID's but that didnt seem to work. Should end up looking like the images below. Many thanks! Beyondspace 1 Link to comment
Beyondspace Posted December 10, 2020 Share Posted December 10, 2020 19 minutes ago, Murso500 said: Site URL: https://guava-guppy-sx4w.squarespace.com/ URL: https://guava-guppy-sx4w.squarespace.com/ PW : test Hi, I've been able to follow a number of forum topics on this subject but cant seem to get the code to work. Have two backgrounds set on the home page, would like to hide the landscape one in mobile and the portrait one in desktop / tablet modes. Tried to locate the section ID's but that didnt seem to work. Should end up looking like the images below. Many thanks! You can follow these steps: 1. Find the section id via this extension Chrome Web Store - Extensions (google.com) 2. Click on it icon to get the id and replace in the below snippet (which I help you find already) @media only screen and (max-width: 640px) { section[data-section-id="5fd13362283fb005030b266b"] .section-background { background-image: url("https://images.squarespace-cdn.com/content/v1/5fa468b9be882012fbd59ab2/1607594230382-R11FF85OTT6H1NXNN9PP/ke17ZwdGBToddI8pDm48kGzoLUibUFZ8FEdlbHgnGb97gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z5QHyNOqBUUEtDDsRWrJLTmci781IWyUbYPSwZLERvZocHiUFKcWq0joGojCpOEnQ_66Ow-oYb1umVRKEE_zXj0/CS-GIF-HOMEPAGE-tall.gif"); background-size: cover; background-repeat: no-repeat; } section[data-section-id="5fd13362283fb005030b266b"] .section-background img { opacity: 0; } } Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
Murso500 Posted December 10, 2020 Author Share Posted December 10, 2020 Thanks for this @bangank36, the tip for the chrome ID finder is great! I couldn't get your code to work but finding the right ID allowed me to use a different code I was playing with prior which works perfectly. Solved! M/. Beyondspace 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment