rtorda Posted May 30, 2023 Share Posted May 30, 2023 Hi, "display:none" in this code acts like "visibility:hidden" in that buttons seem to disappear on mobile (what I want) but the spaces are still there, and outline is visible if I hover. I'd appreciate some help. I am new to adding custom code to squarespace. // Hiding sections on mobile @media screen and (max-width: 1300px) {.sqs-block-button-element {display:none !important; } } Link to comment
paul2009 Posted May 30, 2023 Share Posted May 30, 2023 It sounds like you are targeting the wrong element (.sqs-block-button-element). Try targeting the element with the .sqs-block-button class. If this doesn't work, please provide a working link to the page so that we can check. creedon 1 About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional. Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance. Link to comment
rtorda Posted May 30, 2023 Author Share Posted May 30, 2023 Many thanks. The site is not yet public. https://tarpon-cello-xlcm.squarespace.com/ PW: ground246 I dropped the "-element" in the custom CSS. I am not sure if that is what you suggested. But it did not address the problem. Buttons on main content pages form an alternative navigation to header menus. They don't work on mobile, so I want to drop them all. The site does not use buttons elsewhere, so dropping them globally on mobile is fine. Buttons on first page are not active. They are on the 2nd page on. Link to comment
rtorda Posted May 31, 2023 Author Share Posted May 31, 2023 Thank you for the tip; I found the right code and all is good. Link to comment
Solution paul2009 Posted May 31, 2023 Solution Share Posted May 31, 2023 Thanks for providing a link to the site. Looking at the site, I can see that you want to hide the buttons on the mobile view. If you were using a 'Classic' section, you'd need to use CSS to do this. Using display:none with .sqs-block-button would successfully hide the buttons and collapse the space that they used. However, as you are using a Fluid Engine (FE) section, code won't work in the same way. With FE, the buttons are placed on a grid, and this grid will continue to consume space, even when the buttons are hidden. The good news is that you shouldn't need any code to hide these buttons on mobile! With FE, you should be able to edit this section whilst in mobile view, and then drag the buttons behind the banner image (you can move them 'backward' so they are obscured). After moving them, you can drag the bottom of the grid upwards to consume less space. temp-move-mobile-btns.mp4 Did this help? Please give feedback by clicking an icon below ⬇️ rtorda 1 About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional. Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance. Link to comment
rtorda Posted May 31, 2023 Author Share Posted May 31, 2023 Thanks! This works. I appreciate the help. paul2009 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