I am working on a row of DIVs that resemble menu items. Each item is contained within a parent DIV. When an inside DIV is clicked, it receives the active class. The parent DIV has a 2px grey bottom border, while the active child DIV gets a 6px green bottom border.
The functionality works correctly, but now I want the child's border to overlay the parent's bottom border, so that only the top 4 pixels of the green border are visible above the existing grey line.
I cannot simply apply the same styling to all other children because the parent container has a more intricate design that extends beyond the children.
div.parent {
border-bottom: 5px solid grey;
display: flex;
}
div.active {
border-bottom: 10px solid green;
}
<div class="parent">
<div class="child">whee</div>
<div class="child active">whoo</div>
<div class="child">whaa</div>
</div>
Is there a way to have the child's bottom border overlap the parent's by appearing 2 pixels lower (or using another method)?