WordPress.org

Ready to get started?Download WordPress

Forums

Minimatica
[resolved] Menu .nav question (3 posts)

  1. stargazer713
    Member
    Posted 1 year ago #

    My website: http://0thmirageknight.com/

    I am trying to have the menu display an overline when I hover over it, but at the same time, I do not want the overline to disappear when my mouse hovers over a submenu. This is my code right now:

    /*overline over the menu when hovering*/
    .nav ul li a.hover,
    .nav ul li a:hover {
    text-decoration:overline;
    }

    /*prevents submenu from having overline when hovering over menu*/
    .nav ul ul li a.hover,
    .nav ul ul li a:hover {
    text-decoration:none;
    }

    /*overline for menu when hovering over submenu? does not work!*/
    .nav ul ul li a.hover,
    .nav ul li a:hover {
    text-decoration:overline;
    }

    Please advise, thank you!

  2. stargazer713
    Member
    Posted 1 year ago #

    I have solved the problem:

    /*overline current menu item: for pages*/
    .nav .current-menu-item a {
    	text-decoration:overline;
    }
    
    /*overline current menu parent: for non-linked menu with submenus*/
    .nav .current-menu-parent a {
    	text-decoration:overline;
    }
    
    /*overline menu when hover*/
    .nav ul li a.hover,
    .nav ul li a:hover {
    	text-decoration:overline;
    }
    
    /*prevents submenu overline upon hover*/
    .nav ul ul li a.hover,
    .nav ul ul li a:hover {
    	text-decoration:none;
    }
    
    /*prevents selected submenu overline*/
    .nav .current-menu-parent ul.sub-menu a {
           text-decoration:none;
    }
  3. araujo.soares
    Member
    Posted 9 months ago #

    hey man, how you could put the sub menus go to down?
    what you change for it?
    my submenu only go to top...

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic