Jump to content

Full bleed background colour behind individual blocks.

Recommended Posts

Site URL: https://www.erictomandbruce.com/

I’m using the Template York and am trying to make full bleed, edge to edge background colour behind some of the text blocks  on my page.

 

Currently I’m using this code, but am only able to get it to fill in just around the text rather than the whole page.

 

#block-yui_3_17_2_1_1639016212732_4739{

background: #fbe5ee;

padding: 40px;

text-align: center;

}

 

Is anyone able to help me with some code to extend the coloured area to the edge of the page, and have it resize to fit if the screen size is altered?

Link to comment
1 hour ago, LB4 said:

Site URL: https://www.erictomandbruce.com/

I’m using the Template York and am trying to make full bleed, edge to edge background colour behind some of the text blocks  on my page.

 

Currently I’m using this code, but am only able to get it to fill in just around the text rather than the whole page.

 

#block-yui_3_17_2_1_1639016212732_4739{

background: #fbe5ee;

padding: 40px;

text-align: center;

}

 

Is anyone able to help me with some code to extend the coloured area to the edge of the page, and have it resize to fit if the screen size is altered?

Try

#block-27cc92f7a135477c12aa {
  background: #fbe5ee;
  padding: 0 5%;
  margin: 0 -5%;
}

Let me know how it works on your site

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

My testing result

 

image.png

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
On 1/20/2022 at 7:50 AM, LB4 said:

This works well, thank you so much!

Is there also a way to add some padding to the top and bottom of the pink area above and below the text , to match the padding on the sides?

It looks like you solved with this CSS?

#block-27cc92f7a135477c12aa {
    background: #fbe5ee;
    padding: 35px;
    text-align: center;
}

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

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