Jump to content

Opacity cms block, only background


Recommended Posts

Hello,

 

When using opacity on background of the cms block. I got 2 possibilities.

1. The whole block is in opacity.

2. There is no background. (this is when I want to exclude it with { })

 

Original:

#cmsinfo_block {
  overflow: hidden; 
  background: #0c8bd4;
  min-height: 344px;
  height: 344px;
  padding-right: 29px;
  padding-left: 29px; }
 
 
How I used it.
#cmsinfo_block {
  overflow: hidden; {
  background: #0c8bd4;
  opacity: 0.50; }
  min-height: 344px;
  height: 344px;
  padding-right: 29px;
  padding-left: 29px; }

 

Thanks!

Link to comment
Share on other sites

Your css code is wrong, you can't do like that.
If you want opacity just for the background instead all elements inside block ID #cmsinfo_block, then you can use rgba (but won't work on old browser)

#cmsinfo_block {
  overflow: hidden;
  background: rgba(12, 139, 212, 0.5);
  min-height: 344px;
  height: 344px;
  padding-right: 29px;
  padding-left: 29px;
}

But if you want opacity for all elements inside block ID #cmsinfo_block, then remove the brackets { } within your modified css code.

#cmsinfo_block {
  overflow: hidden;
  background: #0c8bd4;
  opacity: 0.50;
  min-height: 344px;
  height: 344px;
  padding-right: 29px;
  padding-left: 29px;
}
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

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

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...