I want red border to be removed when hover on each item.
As you can see from the jsFiddle that I've attached here. It only worked on the first div on left, and also the rest of the div on the right.
The reason I do it this way is because I want it to be flexible so that I can add or remove on HTML without affecting CSS part.
.wrapper {
height: 100px;
display: flex;
background-color: lightblue;
}
.item {
background-color: lightgreen;
flex: 0 0 15%;
}
.item-left + .item-right {
margin-left: auto;
}
.item-left{
border-left:1px solid red;
}
.item-left:first-of-type{
border:none;
}
.item-left:last-of-type{
border-right:1px solid red;
}
.item-right{
border-left:1px solid red;
}
.item:hover{
/* box-shadow: x y blur spread color; */
box-shadow:0px 0px 0px -1px rgba(0, 0, 0, 0.2), 0px 0px 10px 0px rgba(0, 0, 0, 0.19);
z-index:1;
}
.item:hover + .item.item-left, .item.item-right {
border:none;
}
<div id="bottom" class="bottom">
<div class="wrapper">
<a class="item item-left">
<div class="item-label">Left</div>
</a>
<a class="item item-left">
<div class="item-label">Left</div>
</a>
<a class="item item-left">
<div class="item-label">Left</div>
</a>
<a class="item item-right">
<div class="item-label">Right</div>
</a>
<a class="item item-right">
<div class="item-label">Right</div>
</a>
<a class="item item-right">
<div class="item-label">Right</div>
</a>
</div>
</div>
Thanks for the help!