Jump to content

Hiding section of Index page on desktop & mobile

Recommended Posts

Site URL: https://tuatara-cinnamon-hsra.squarespace.com/

Site password: Bellealliancedesign

On the homepage, I am trying to hide the #desktop section on mobile and the #landing-page-mobile section (with the scrolling carousal), on desktop. The below code isn't working for me. 

Any advice?

@media screen and (max-width: 640px) { div#desktop {visibility: hidden !important; display: none !important; }}

@media screen and (min-width: 640px) { div#landing-page-mobile {visibility: hidden !important; display: none !important; }}

Link to comment
  • Replies 1
  • Views 750
  • Created
  • Last Reply
On 12/4/2020 at 12:44 AM, alwalt said:

Site URL: https://tuatara-cinnamon-hsra.squarespace.com/

Site password: Bellealliancedesign

On the homepage, I am trying to hide the #desktop section on mobile and the #landing-page-mobile section (with the scrolling carousal), on desktop. The below code isn't working for me. 

Any advice?

@media screen and (max-width: 640px) { div#desktop {visibility: hidden !important; display: none !important; }}

@media screen and (min-width: 640px) { div#landing-page-mobile {visibility: hidden !important; display: none !important; }}

Correct snippet should be

image.png.77959bba349ff1812272168f85f66cb6.png

@media screen and (max-width: 640px) { div#landing-page-desktop-section {visibility: hidden !important; display: none !important; }}

@media screen and (min-width: 640px) { div#landing-page-mobile-section {visibility: hidden !important; display: none !important; }}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.