Jump to content

How do I change the background opacity of a block?

Recommended Posts

How would I go about changing the background opacity of a content block? This is the current code I have in the CSS Editor:

#block-4e5265faf96ce435b6ce {
 border-style: double white 10px;
 background-color: black; opacity: .3;
 padding-top: 20px

Link to comment
  • Replies 6
  • Views 20.3k
  • Created
  • Last Reply

Use RGBA to set the color, it supports alpha transparency as the 4th parameter:

block-4e5265faf96ce435b6ce {
 border-style: double;
 border-color: white;
 border-width: 10px;
 padding-top: 20px;
 background-color: #afafaf; /* fallback for old browsers */
 background-color: rgba(0, 0, 0, .3);

Link to comment
  • 7 months later...
  • 3 months later...
  • 1 year later...


This topic is now archived and is closed to further replies.

This topic is now 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.