Archived topic
How to change the style of a single menu item
3 replies · Started by Vl on March 8, 2018
Hi!
1. In one of the posts, you advised this code so that the link doesn’t do anything:
.main-navigation .main-nav ul li[class*=”current-menu-“] > a {
pointer-events: none;
}
In addition, I need to change the style of one menu item. Now I'm inserting this code in the Menu Structure – Navigation Label:
<span style = “background-image: url (/images/01.gif); background-repeat: no-repeat; background-position: left center; padding: 0px 0px 0px 30px; color: # FF0000; font-family: Impact; font-size: 24px; “> MAIN PAGE </ span>
Is it possible to make a CSS class from these codes to insert it into Menu Structure - CSS Classes?
Thanks for your support!
Hi there,
Check out this method here for targeting a specific menu item: https://docs.generatepress.com/article/adding-buttons-navigation/
Let me know if this helps.
Thank you, everything is fine.
No problem :)