Hi, I need assisstance in completing an active tab display…..
As you can see in the image above, I am trying to design the display of Pipboy’s gear.
The top navbar highlights different navigation options, of which the active tab is displayed with a certain half border (the STAT tab in the above case)… I am unable to achieve this.
I tried using the before pseudo element on the li element which contains the active tab. This is the CSS I apply to the Pseudo element.
#header-navbar > .navbar-collapse > .navbar-nav > .active::before {
content: “”;
background: red;
position: absolute;
height: 20px;
width: 100%
}
However, the width is not set to a 100% of the li element, and what I get is a red strip covering the entire navbar like this
Any fixes for this…..