Presently, I am dealing with 2 overlapping transparent div
's each containing unique buttons and functionalities in the following manner:
.item1{
height:10rem;
width:10rem;
position:absolute;
border:0.5rem solid red;
background-color:transparent;
}
.item2{
height:10rem;
width:10rem;
position:absolute;
top:5rem;
left:2rem;
border:0.5rem solid blue;
background-color:transparent;
}
<div class="item2">
<button>button 2</button>
</div>
<div class="item1">
<button>button 1</button>
</div>
However, I am seeking a way for these divs to behave as hollow so that even if they overlap, such as in the example above, it is possible to click on button2
. Is this scenario achievable?
Note:
I am not interested in utilizing any alternative solutions like SVG rectangles instead.