Impossible to separately use CSS per menu item

Posted in: Newspaper
Post count: 3

Hello,

It is impossible to add an underlining on the menu item ‘GRATIS DEMO’. I have tried to make a new class “gratis_demo” and with the pre-assigned class “menu-item-1247” it’s also impossible. It seems that the CSS for this item is overruled by something but I can’t find what is overruling it.

https://shorturl.at/OVWY3

I look forward to your reply.

Post count: 21065

Hello @Jelmertje!

We already have an option for an item menu when it is active and on hover: https://app.screencast.com/Ne2RzzM5Smtre
Check this guide: https://www.wpbeginner.com/wp-themes/how-to-style-wordpress-navigation-menus/

I hope that helps you!

Thank you!

Post count: 3

Hello Bettina,

Thank you for your reply!

This is indeed known to me. The theme options mentioned in the first link you sent are not applicable as it is only for one menu item. Regarding the second link, this is indeed the principle that I am following. However, it is unfortunately not possible to underline this specific menu item while I am using the correct class. I’m using this code:

.menu-item-1247 {
text-decoration: underline !important;
}

Do you have any further suggestions?

I look forward to your reply.

Thanks!

Post count: 21065

Hello @jelmertje!

Try to add this CSS code:

.tdb_header_menu .tdb-menu>li:nth-child(4)>a .tdb-menu-item-text{
text-decoration: underline !important;
}

Thank you!

Post count: 3

Hello Bettina,

Thanks a lot, this worked! Could you please tell me how you were able to find this correct class since it did not appear in the console, as far as I can see.

Thanks! 🙂

Post count: 21065

Hello @jelmertje!

When you inspect the code, you can see the classes there. Follow this guide:
https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/

Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.