Jump to content

Remove spacer block on smaller screen size

Recommended Posts

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
  • Replies 6
  • Views 431
  • Created
  • Last Reply
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
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
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
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

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.