Jump to content

Format Typography With A Colour Background With Limited Width

Go to solution Solved by Parker_SQSP,

Recommended Posts

Hello! I cannot share the site I am on but I can share a snippet of an issue I am having. I am trying to put a cool block background behind some text as a text style but it always goes full width. I don't want this to span the full width of the page. Putting a spacer on each side becomes problematic when scaling the page. Does anyone have any code?

1237002174_ScreenShot2022-03-21at5_15_23PM.thumb.png.6687eb2191c08873995f42b291540a4f.png


What I used is below:

// Type Style Purple //
#block-b3b375abb1ec025926c0 {
  background: #c40aff;
  padding: .2rem, .2rem, .2rem, .2rem;
  max-width: 200px;
}
// Type Style Purple //

It's also not centered properly. Any help would be great!

 

Edited by SparkandPony
Link to comment
  • Replies 2
  • Views 177
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 4 months later...
  • Solution

Hi @SparkandPony!

I wanted to let you know that you can now add a background color to Text, Accordion, Summary, Quote, and Newsletter blocks directly in Squarespace. This may help you achieve the design that you were looking for. Here's some more information about that: 

https://support.squarespace.com/hc/en-us/articles/205815278#toc-change-block-background-colors

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.