I successfully pulled code from a post I found in this forum and it accomplished what i wanted to do on my website (desktop version). I wanted to place an underline, color specific, onto the nav menu options. The code worked yet when I go into the mobile version of my website the lines are way too long. Below I'm going to include the code I used.... is there anyone who can give me direction on how to code the mobile version to work as I would like it to? Thanks!
/* Change the underline color of the top menu links */
.header-nav-item a {
position: relative;
text-decoration: none !important;
color: #43c6ff; /* Set the color of the link */
}
.header-nav-item a::after {
content: "";
position: absolute;
left: 0;
bottom: -2px; /* Adjust the positioning of the underline */
width: 100%;
height: 2px; /* Adjust the height of the underline */
background-color: #43c6ff; /* Set the color of the underline */
visibility: hidden;
opacity: 0;
transition: opacity 0.4s;
}
.header-nav-item a:hover::after,
.header-nav-item a:focus::after,
.header-nav-item--active a::after {
visibility: visible;
opacity: 1;
}
/* Optional: Change the underline color when the link is active or focused */
.header-nav-item--active a::after {
background-color: #43c6ff; /* Set the color of the underline when the link is active */
}
div.header-nav-item a {
display: inline-block;
}
div.header-menu-nav-item a::after {
content: "";
position: absolute;
left: 0;
bottom: -2px;
width: 100%;
height: 2px;
background-color: #43c6ff;
visibility: hidden;
opacity: 0;
transition: opacity .4s;
}
div.header-menu-nav-item a:hover::after {
visibility: visible;
opacity: 1;
}
.header-menu-nav-item-content {
position: relative;
display: inline-block;
pointer-events: none;
}