-
AuthorPosts
-
February 9, 2020 at 1:40 pm #1182716
Hi, how can I change the background color of a specific item on the main menu?
I already found this in the documentation for the complete background:To change the background color of the main menu items go to Enfold > Advanced Styling > Main Menu Links > Background Color. To make changes using CSS please use the below code:
/* Main menu links */
#top #header #avia-menu li.menu-item > a {
background-color: gold;
}How can I change it only for one specific menu item?
February 9, 2020 at 3:50 pm #1182767Hey Juli,
If you inspect the element in question then you will find an ID for each of your menu items (the li element), you can use that to target the background of the link.
Best regards,
RikardFebruary 9, 2020 at 4:56 pm #1182777Hey Rikard,
thank you for your tip! I want to have a different background for the menu item „SEMINARE“. The id of this item seems to be 10115.
Unfortunately there is no change at all if I put this with CSS:#top #header #avia-menu li id=”menu-item-10115″ > a {
background-color: gold;
}Could you please have a look? I send you a temporary login.
Best regards,
JuliFebruary 10, 2020 at 5:50 am #1182929Hi,
Please try this CSS instead:
#top #header #avia-menu #menu-item-10115 a { background-color: gold; }
Best regards,
RikardFebruary 10, 2020 at 9:44 am #1182970Hi Rikard,
I tried it but unfortunately there is no change.
Best regards,
JuliFebruary 10, 2020 at 2:07 pm #1183051Hi,
Maybe because you have a caching plugin active? This code works when I test it on your site:
#menu-item-10115 a { background: gold; }
Best regards,
RikardFebruary 10, 2020 at 7:13 pm #1183184Hi Rikard,
I don’t know why it is not working – even if I refresh several times, clear my cache or deactivate the caching plugin altogether.
Still no color in the background. Do you have any other idea?
Best regards,
JuliFebruary 11, 2020 at 1:02 pm #1183435Hi,
No I don’t have any other ideas, but if you give us login details to your site then we can do it for you?
Best regards,
RikardFebruary 12, 2020 at 12:57 am #1183709Hi Rikard,
I already posted the login information / temporary login details on February 9th. I put the in „private content“ again.
Thank you for your support!
Beste regards,
JuliFebruary 12, 2020 at 2:03 pm #1183876Hi,
Thanks for that. I added the CSS to the top of your Quick CSS box and it’s now applying to your site.
Best regards,
RikardFebruary 12, 2020 at 8:40 pm #1183990Yey, it works – thank you very much, Rikard!!!
February 13, 2020 at 8:08 am #1184069Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Background color of one menu-item’ is closed to new replies.