I am a bit new to CSS but am creating a website on Squarespace and am having trouble overriding the parent class. Basically, I have been trying to make it so that all images in the grid are dark, and when you hover over them they light up along with the text. The problem is, the text from h2 and h3 always seem to be overridden by the opacity of the .wrapper.
Currently the source code looks something like this:
<div class="item">
<a href="/news/" data-dynamic-load data-dynamic-receiver="#detail_540e1c21e4b00b3e087650b7" >
<div class="wrapper">
<div class="project-title">
<h2>NEWS</h2>
<h3>— view —</h3>
</div>
</div>
</div>
I have tried a few ways, between displaying and using opacity. Something like:
#grid .item {
.wrapper {
opacity: 1;
.project-title h2,h3 {
display:none;
}
}
&.hovering .wrapper {
opacity: 0;
.project-title h2,h3 {
display:block !important;}
}
}
Any advice in fixing this issue?