Issue with -
.popupcard_first:hover .popupcard_first {
display: block;
}
I am trying to link the :hover
effect to the first card only, but the only way I could make it work is by changing .popupcard
... to
.featured_cards:hover .popupcard_first {
display: block;
}
However, this applies to every element in the row which is not what I want.
<div class="featured_cards">
<div class="card_one"><a href=""><img src="https://maxcdn.icons8.com/Share/icon/Logos//jsfiddle1600.png" alt=""></a>
</div>
<div class="popupcard_first">
<div class="circle"><a href=""><img src="https://maxcdn.icons8.com/Share/icon/Logos//jsfiddle1600.png" alt=""></a></div>
<div class="textname">Fishnet Chair</div>
<div class="smalltextname">Seat and back with upholstery made of cold cure foam</div>
</div>
<div class="cards center two"><a href=""><img src="https://maxcdn.icons8.com/Share/icon/Logos//jsfiddle1600.png" alt=""></a>
</div>
<div class="cards center three"><a href=""><img src="https://maxcdn.icons8.com/Share/icon/Logos//jsfiddle1600.png" alt=""></a></div>
<div class="cards edge four"><a href=""><img src="https://maxcdn.icons8.com/Share/icon/Logos//jsfiddle1600.png" alt=""></a></div></div>
CSS
*{
width 1380px;
}
img[title='arrow'] {
display: inline;
width: 9px;
height: 13px;
}
.featured_cards img{
width: 270px;
height: 270px;
}
.featured_cards {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-right: 98px;
margin-left: 98px;
position: relative;
height: 270px;
margin-top: 50px;
}
.popupcard_first {
height: 270px;
width: 270px;
position: absolute;
background-color: white;
opacity: 0.9;
display: none;
}
.featured_cards:hover .popupcard_first {
display: block;
}
.circle {
width: 48px;
height: 48px;
object-fit: contain;
border-radius: 24px;
background-color: #ffffff;
box-shadow: 0px 2px 4.9px 0.2px rgba(33, 33, 33, 0.35);
margin: 62px 111px 0px 111px;
}
.circle img {
margin: 14px 18px;
width: 12px;
height: 20px;
}
.textname {
width: 145px;
height: 17px;
object-fit: contain;
font-family: Montserrat;
font-size: 21px;
font-weight: bold;
line-height: 1.36;
text-align: center;
color: #212121;
margin: 19px 62px 0 63px;
}
.smalltextname {
width: 206px;
height: 33px;
object-fit: contain;
font-family: Montserrat;
font-size: 13.9px;
font-weight: 300;
line-height: 1.57;
text-align: center;
color: #6c6c6c;
text-align: center;
margin: 23px 32px 0px 32px;
}
Many thanks