Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

[Resolved] diferent menu items colors according to state

Home Forums Support [Resolved] diferent menu items colors according to state

Home Forums Support diferent menu items colors according to state

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #189356
    Bogdan

    Hi Tom. What built-in classes should I use for the following scenario:
    1. Primary Menu Items
    2. when initially, all menu items have colour1
    3. when hover, each menu item has different colour2, colour 3 etc.
    4. when current, the respective item stays with its colour (from pt. 3 above), others revert to a common visited colour4

    I know, may be unusual πŸ™‚ Thanks in advance!

    #189364
    Bogdan

    After reading other similar posts, i found this working:

    Setting from customizer gives colour1.

    /* for hover */
    .main-navigation .main-nav ul li.my_class a:hover {
          color: #colour2;
    }
    
    /* for selected/current */
    .main-navigation .main-nav ul li.current-menu-item.my_class a {
          color: #colour2;
    }

    Did not tried to solve colour4, works nice like this.
    my_class is item-specific custom CSS class set in Menu Items.

    • This reply was modified 5 years, 7 months ago by Tom.
    #189391
    Tom
    Lead Developer
    Lead Developer

    Glad you were able to find a solution in the forum πŸ™‚

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.