Jump to content

semi transparent color for text background, 7.1

Recommended Posts

Hi, I have no css experience but got this code from someone to put color behind my text, so it's easier to read. When I make it semi-transparent, the changes don't show up on the live site. It seems like Squarespace doesn't like the semi-transparent option. Does anyone know if it's possible to have a semi-transparent color behind text?

 

Copied the code below. To make the color transparent I added e0 after the color, like this: #947342e0

 

#collection-5f4719c8e451e21ba1543a9d .sqs-block-html .sqs-block-content {
    padding-left: 5%;
    padding-right: 3%;
    padding-top: 2%; padding-bottom: 2%;
    background-color: #947342;
}

 

Thank you! Am also wondering if there's a way to target just the text in the main part of the page, and leave text in the footer alone. (right now, when I add text to the footer it also comes with a background color. Thanks very much for the help.

Screen Shot 2020-08-30 at 4.52.19 PM.png

Screen Shot 2020-08-30 at 4.52.39 PM.png

Link to comment
  • 4 months later...
  • Replies 2
  • Views 3.8k
  • Created
  • Last Reply
  • 6 months later...

@numbereight I just posted a blog post on this that may help you.

rebeccagracedesigns.com/blog/add-a-transparent-background-to-text-and-buttons-in-squarespace 

@KseniaYa is correct. The best way to get a transparent color is to use an rgba code instead of a hex code. I believe for your specific color you would use rgba (148, 115, 66, 0.5) . You can then change the 0.5 to any number between 0 and 1 to change the opacity. 
 

Coding Wiz at rebeccagracedesigns.com

📖 Code Encyclopedia for Squarespace: rebeccagracedesigns.com/encyclopedia-of-code

🔥 Free CSS Tutorials: rebeccagracedesigns.com/blog

️ Free Guide to the 41 Most Popular CSS Properties: rebeccagracedesigns.com/popular-css-properties

 

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.