Assign different colors to the link of each category of the megamenu

Posted in: Newspaper
Post count: 26

Hi, I’m using the template: https://demo.tagdiv.com/newspaper_week_pro/
Could you help me understand how to modify the css so that I can assign a certain color to each category item link? And the same thing for the subcategories?
For example: I want the politics category to turn blue on hover and when selected.

Post count: 27744

Hello,

You can achieve something with custom code css; you can check this topic => https://forum.tagdiv.com/topic/mobile-theme-duplicate-titles-missing-categories-category-tag-colour/

Thank you!

Post count: 26

Hi, I’ve seen this post before but to no avail. The Template I use is this: https://giuseppeerrico.it/molaliberanew/, could you help me understand how to assign a specific color to each category tag? Mega menu items included? Thank you

Post count: 27744

Hi,

You need to set the menu item id for each element from menu https://i.imgur.com/kyOsD0S.png -> https://i.imgur.com/aPhOxga.png .menu-item-25410, .td-module-image a[href$="/politica/"], .td-meta-info-container a[href$="/politica/"], .td-module-container a[href$="/politica/"], .single .td-category a[href$="/politica/"], .tdb_single_categories a[href$="/politica/"]
{
background-color: green;
}

Thank you!

Post count: 26

Thanks but this is not the result I would like to achieve. I don’t want to assign a color to the background of the menu item, I would like the color to be assigned to the menu text on mouse hover.

Post count: 27744

Hi,

You can do it with custom code css -> https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/

Thank you!

Post count: 26

Could you help me, through “inspect” I found the rule that assigns the color to the menu item:

.tdi_77 .tdb-menu > li:hover > a {
color: #ff69b4;
}

but I didn’t understand how to change it for the individual menu item (for example politica: .menu-item-25410 )

Post count: 27744

Hi,

Please use this code https://i.imgur.com/FRqO9wB.jpg .tdb_header_menu .tdb-menu>li>a[href$="/politica/"]
{
color: green;
}
.tdb_header_menu .tdb-menu>li>a[href$="/cultura/"]
{
color: red;
}
You need to do it for each category.

Thank you!

Post count: 26

With your code the color of the menu item is changed, but I would like the color to be changed to be that of the mouse hover link above

Post count: 26

ok, I solved it like this:

.tdb_header_menu .tdb-menu>li>a:hover[href$=”/politica/”]
{
color: #ff69b4;
}

thanks

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