I'm trying to show text while hovering over a container.
I have this code which works to display some text when hovering over item2. All of this is inside of a container. The issue with this though is if you hover anywhere other than item1 or item3, like in between them, the text will disappear again or spam swap between display:none; and display:flex;
Code:
.item1 {
font-size: 1.5em;
font-family: 'Poppins', sans-serif;
grid-column:1 / span 1;
}
.item2 {
grid-column: 1 / span 1;
}
.item2:hover + .item3{
display: flex;
}
.item3:hover{
display: flex;
}
.item3 {
display: none;
font-family: 'Poppins', sans-serif;
grid-column: 1 / span 2;
align-items: center;
font-size: 1.5em;
}
To fix this issue I tried:
.grid-containerTest:hover + .item3{
display: flex;
}
Which does nothing. What can I do to hover over .grid-containerTest and show .item3, if possible show more than one hidden element when hovering over it.