-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
  • 34,719
  • 24
  • 185
  • 251
user3550879
  • 3,307
  • 6
  • 30
  • 55

1 Answers1

0

Try:

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

In your css.

Alan Tweedie
  • 187
  • 1
  • 5