Currently, I am facing an issue where I have two divs positioned next to each other in a line.
The HTML structure is as follows:
<div>
<div class="box1"></div>
<div class="box2"></div>
</div>
The CSS for the divs is listed below:
.box1 {
width:200px;
min-height:200px;
background:blue;
float:left;
margin:20px 0 0 0;
}
.box1:hover {
background: white;
box-shadow: 0px 0px 5px 5px #888888;
height:200px;
margin:20px 0 0 0;
}
.box2 {
width:200px;
min-height:200px;
background:blue;
float:left;
margin:20px 0 0 0;
}
.box2:hover {
background: white;
box-shadow: 0px 0px 5px 5px #888888;
height:200px;
margin:20px 0 0 0;
}
The problem arises when hovering over the left div, the shadow appears under the right div. Conversely, hovering over the right div causes the shadow to appear over the left div. I've tried using z-index adjustments without success. Any suggestions on how to make both shadows consistent?