-1

I have two types of Wordpress posts which are wrapped in link tags and brought in through the loop.

html

<a id="article-image"> 
  <section> post content </section> 
  <div class="bg-Hide"></div>
</div>

and

<a id="article-title">
  <section> post content </section>
</div>

css

.bg-Hide { 
  position: absolute;
  opacity: 0; 
  width: 100%; height: 100%;
  top: 0; left: 0;  
  background-color: rgba(32, 42, 52, 0.75);
}

I want to change the opacity of .bg-Hide to opacity: 1; when the user hovers over the .article-image posts

But can't seem to create the right css target

Cœur
  • 37,241
  • 25
  • 195
  • 267
user3550879
  • 3,389
  • 6
  • 33
  • 62

1 Answers1

0

Try:

.bg-Hide:hover {
  opacity:1;
}

In your css.

Alan Tweedie
  • 317
  • 2
  • 5