<div class="account_image">
<img src="img/profile_p.jpg" class="profile_picture">
<div class="t_overlay">
CHANGE AVATAR
</div>
</div>
.profile_picture{
width: 60px;
height: 60px;
object-fit: cover;
border-radius: 50%;
margin-left: 65px;
filter: brightness(100%);
cursor: pointer;
}
.profile_picture:hover{
filter: brightness(70%);
transition: filter 0.25s ease;
}
.t_overlay{
position: absolute;
margin-left: 76px;
margin-top: -43px;
font-size: 10px;
height: 0px;
width: 0px;
line-height: 1.2;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
cursor: pointer;
opacity: 1;
color: white;
}
.t_overlay:hover profile_picture{
filter: brightness(70%);
}
I have a code that if you hover over an profile picture it decreases brightness of profile picture to 70% percent. "CHANGE AVATAR text is in the middle of profile picture. If I hover over "CHANGE AVATAR" text, brightness of profile picture increases to 100% again but I want it to stay to 70%.