If you hover above the second, third or forth item the hidden text shows up on the left side.
If you move your cursor to the hidden text, the hidden text will hide again.
But i want that you can hover over the second item, move your cursor to the "hide" and e.g. click on it. Is this possible in CSS or JS?
The HTML:
<div class="container">
<div class="item">item
<div class="hide">hide</div>
</div>
<div class="item">item <div class="hide">hide</div></div>
<div class="item">item <div class="hide">hide</div></div>
<div class="item">item <div class="hide">hide</div></div>
</div>
The CSS:
.container {
display: flex;
position: relative;
}
.item {
padding: 1px;
cursor: pointer;
}
.hide {
opacity: 0;
position: absolute;
left: 0;
}
.item:hover .hide {
display: block;
opacity: 1;
}
I tried to expand the width from the hide element, but that doesn't work
.hide {
width: 100vw;
}
Is there a method to expand the hide elements width or something else, so the "hide" won't go away if the parent element isn't hovered?