JCF Posted February 12, 2021 Share Posted February 12, 2021 I'd like to remove the spacer blocks to the right of some text but only when viewed on a smaller desktop screen. This is so the text runs along the full width of the screen when the screen goes below a certain size. I have tried the CSS code below but nothing happened. Can anyone shed any light? Thank you! /* Remove spacer block */ @media screen and (max-width:740px) { .space-block { display: none !important; } } Link to comment
dvgdvgdvg Posted February 12, 2021 Share Posted February 12, 2021 Please provide site URL (and password if needed) when posting coding questions, so folks can get you accurate answers. Link to comment
JCF Posted February 12, 2021 Author Share Posted February 12, 2021 Thanks for your fast reply! www.charlottefeldforth.com Link to comment
tuanphan Posted February 14, 2021 Share Posted February 14, 2021 On 2/13/2021 at 4:26 AM, JCF said: Thanks for your fast reply! www.charlottefeldforth.com Try adding this to Settings > Advanced > code Injection > Header <style> /* Remove spacer block */ @media screen and (max-width:767px) { .space-block { display: none !important; } } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
JCF Posted February 15, 2021 Author Share Posted February 15, 2021 20 hours ago, tuanphan said: Try adding this to Settings > Advanced > code Injection > Header <style> /* Remove spacer block */ @media screen and (max-width:767px) { .space-block { display: none !important; } } </style> Thanks for getting back to me. That didn't work unfortunately... The strapline text is a block on the homepage, it isn't part of the header as far as I know, if that makes any difference? Link to comment
JCF Posted February 15, 2021 Author Share Posted February 15, 2021 59 minutes ago, JCF said: Thanks for getting back to me. That didn't work unfortunately... The strapline text is a block on the homepage, it isn't part of the header as far as I know, if that makes any difference? UPDATE: For now I have added the strapline text as a separate block and adjusted the width of that block to something that responds better across different screen sizes, but I would still love to know how to remove spacer blocks successfully across the site for when screen is smaller than a certain amount, as these blocks are affecting text throughout. Thanks! Link to comment
dvgdvgdvg Posted February 15, 2021 Share Posted February 15, 2021 On 2/12/2021 at 2:52 PM, JCF said: I'd like to remove the spacer blocks to the right of some text but only when viewed on a smaller desktop screen. This is so the text runs along the full width of the screen when the screen goes below a certain size. I have tried the CSS code below but nothing happened. Can anyone shed any light? Thank you! /* Remove spacer block */ @media screen and (max-width:740px) { .space-block { display: none !important; } } I think you just need to change ".space-block" to ".spacer-block" with an r. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.