I am in the process of creating a music streaming website and I would like the play button to appear when hovering over a song. However, I am encountering an issue with the CSS section overriding the others that are meant for different parts (I am using FontAwesome icons).
.play-btn {
position: absolute;
width: 70px;
height: 70px;
left: 0;
top: 50px;
text-align: center;
opacity: 0;
transition: opacity 0.35s ease;
}
.containera:hover .play-btn {
opacity: 1;
}
.play-btn a:hover {
transition: 0.2s;
opacity: 0.6;
}
.sameMovieCard:hover .play-btn_songpost {
opacity: 1;
z-index: 999;
}
#songlist .play-btn {
position: absolute;
height: 70px;
width: 70px;
top: -10px;
left: 0;
text-align: center;
opacity: 0;
transition: opacity 0.35s ease;
}
<div class="sameMovieCard">
<div class="container_songpost">
<img src="..." id="A_..." />
<div class="overlay_songpost"></div>
<div class="play-btn_songpost">
<a class="play-btn" data-song-url="..." id="..." onclick="playSong(this)">
<i class="fas fa-play-circle fa-2x"></i>
</a>
</div>
</div>
</div>