scholarsayze Posted December 22, 2020 Share Posted December 22, 2020 Site URL: https://bluebird-porcupine-yzdg.squarespace.com/ Hello, I am currently using this code to hide a section so it appears on mobile and tablet only (hidden from Desktop): @media only screen and (min-width:768px) { [data-section-id="ENTER DATA SECTION ID HERE"] { display: none;}} I am also using this code to hide a section so it appears on desktop only (hidden from Mobile and Tablet): @media screen and (max-width:991px) { [data-section-id="5ef4c07482b8e941cd5ebc10"] { display: none; } } I am aware however that most tablets and some phones now have higher screen resolution. So is this the best reliable way to do this? Or is there a better code? My objective, I am trying to have two sets of code: 1 - to hide a section from mobile and tablet so it appears on DESKTOP ONLY 2 - to hide a section from desktop so it appears on MOBILE AND DESKTOP ONLY Please can you help confirm this is ok? Site url = https://bluebird-porcupine-yzdg.squarespace.com/ Pword = bluebird Many thanks. Best, Faiz Link to comment
Beyondspace Posted December 22, 2020 Share Posted December 22, 2020 1 hour ago, scholarsayze said: Site URL: https://bluebird-porcupine-yzdg.squarespace.com/ Hello, I am currently using this code to hide a section so it appears on mobile and tablet only (hidden from Desktop): @media only screen and (min-width:768px) { [data-section-id="ENTER DATA SECTION ID HERE"] { display: none;}} I am also using this code to hide a section so it appears on desktop only (hidden from Mobile and Tablet): @media screen and (max-width:991px) { [data-section-id="5ef4c07482b8e941cd5ebc10"] { display: none; } } I am aware however that most tablets and some phones now have higher screen resolution. So is this the best reliable way to do this? Or is there a better code? My objective, I am trying to have two sets of code: 1 - to hide a section from mobile and tablet so it appears on DESKTOP ONLY 2 - to hide a section from desktop so it appears on MOBILE AND DESKTOP ONLY Please can you help confirm this is ok? Site url = https://bluebird-porcupine-yzdg.squarespace.com/ Pword = bluebird Many thanks. Best, Faiz Code is fine I think BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight 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
scholarsayze Posted December 22, 2020 Author Share Posted December 22, 2020 Thank you so much Bangank36 - thanks for confirming 💯 Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.