I am a newbie to wordpress and travelify, want to know how to modify the css change when hover and selected a menu item.
Currently it change the background color, I would like to keep the background color unchange and change the color of border-bottom instead.
I am still trying to do the customization with a child theme on my laptop locally, sorry that i cannot provide my site for your reference.
I tried to add the following to my style.css of my child theme.
But it failed, background color of selected/hover item are still there.
The border-bottom appeared, but causing the nav bar to expand downward, my target is to put the border just stick to the baseline.
#main-nav li:hover, #main-nav ul ul :hover, #main-nav a:focus {
background-color: transparent;
background-clip: border-box;
border-bottom: 10px solid #439f55;
}
To achieve this could you please try adding the following CSS code in the Custom CSS option of your theme on the below path or in the style.css file of your child theme. Remove the above shared code from the site.
Admin Area -> Apperance -> Theme Options -> Other -> Custom CSS
#main-nav ul.root > li:hover > a,
#main-nav ul.root > li a:focus,
body #main-nav ul.root > li.current-menu-ancestor a,
body #main-nav ul.root > li.current-menu-item a,
#main-nav ul.root > li a:active {
border-bottom: 8px solid #439f55;
background-color: inherit !important;
-webkit-box-sizing: border-box !important; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box !important; /* Firefox, other Gecko */
box-sizing: border-box !important; /* Opera/IE 8+ */
height: 40px;
box-shadow: none !important;
}