Change navigation underline color (original) (raw)

Viewing 15 replies - 1 through 15 (of 15 total)

.wp-block-navigation .wp-block-navigation-item__content {  
   padding-bottom:2px;  
}  
.wp-block-navigation .wp-block-navigation-item__content:hover {  
   border-bottom:2px solid red;  
    padding-bottom:0;  
}  

To tweak this for your needs you can:

.wp-block-navigation .wp-block-navigation-item__content {  
   padding-bottom:2px;  
   text-decoration:none !important; // hides the default underline  
   padding-left: 20px; padding-right: 20px; // padding so the underline goes wider than the text  
}  
.wp-block-navigation .wp-block-navigation-item__content:hover {  
   border-bottom:2px solid red;  
    padding-bottom:0;  
}  

Hi jordesign
The underline goes wider than the text only on the right. Please see link https://postimg.cc/CRCPxzjb I checked the position of the menu items and they are all justified to the center. When I saved your code I got the “There is an error with your css structure.” message. Hope you can figure this one out. Otherwise no worries I am still happy with what you have provided.
vas
Hey @vastzor !

I got the “There is an error with your css structure.” message.
Do you have additional css from before as well? Can you share a screenshot of when you try to save the css, and it shows the error?
Had some css from before but never got the error message. The code works just fine except for the underline going wider than the text only on the right. Here is the link https://postimg.cc/1V3mdjwf
@vastzor Can you try removing the comments in the css code, since they’re not correctly formatted? These are the descriptions written with //?
Hi @vastzor
As we haven’t received a response in over a month, we assume your issue has been resolved. However, if you’re still experiencing any issues, please feel free to mark the topic as unresolved or if you have new questions, please start a new topic. Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)