I'm trying to change the opacity of a div when I hover on another div, but it isn't working at all. Here's the HTML:
.chatdate {
padding-top: 10px;
opacity: 0.5;
transition: opacity 1s ease-in-out;
}
.workstream-comment:hover .chatdate {
background: red;
opacity: 1;
}
<div class="col-lg-12">
<div class="row">
<div class="col-lg-10">
<div class="workstream-comment">
...
</div>
</div>
<div class="col-lg-2">
<div class="chatdate text-center">
<h6>15/07/2017</h6>
<br>
<h1>11:07</h1>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-10">
<div class="workstream-comment">
...
</div>
</div>
<div class="col-lg-2">
<div class="chatdate text-center">
<h6>15/07/2017</h6>
<br>
<h1>11:07</h1>
</div>
</div>
</div>
</div>
Can anyone tell me what I'm doing wrong? Thanks
.row > .col-lg-10:hover + .col-lg-2 > .chatdate