In an attempt to make a div disappear when hovering over another div using only CSS, I have set up two divs:
<div class="" id="target">I will disappear</div>
<div class="hover_box">Hover me</div>
Here is my SCSS code:
#target {
background-color: blue;
height: 100px;
width: 100px;
}
.hover_box {
background-color: red;
height: 100px;
width: 100px;
&:hover #target{
display: none !important;
/* background-color: green !important; */
}
}
Unfortunately, this setup does not seem to work as intended. You can view the issue in action here: