Jump to content

How to apply opactity to parent class


Recommended Posts

Hello,

HTML:

<section id="block-situations">
<h2 class="block-title">Need to Sell Your House</h2>
<div class="field field--name-body">
<div class="padd"> 
<ul class="eclipse-list"><li>Single family house</li>
  <li>Mult-units</li>
  <li>Town homes</li>
</ul>
</div>
</div>
</section>

CSS:

#block-situations {
    background-image: url(home-for-cash.png);
    background-repeat: no-repeat;
    background-size: cover;
    opacity: .5;
}

 

I like to apply opacity to #block-situations only. It works. But the problem is that eclipse.list class contents grayed out. That means once I have the opacity, .eclipse-list contents are not clear. How to apply opacity to parent class without affecting the eclipse-list class contents?

Thanks!

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...