- This topic has 12 replies, 2 voices, and was last updated 3 years, 4 months ago by David.
-
AuthorPosts
-
December 4, 2020 at 2:31 am #1566947Alberto
Hi everybody.
You were previously so kind to give me the code to make Menu items underline on page and hover.
Here -> https://www.bfbinsurancebroker.com/convenzione-atmos/I’ve added a Submenu item on Associazioni.
Could you help me to make the submenu formatted like the menu item?Hope I explain me well…
thanks in advance
Alberto
December 4, 2020 at 2:34 am #1566952AlbertoOh, that’s the code:
/* Underline Menu*/
.main-navigation .main-nav ul li[class*=”current-menu-“]>a:after,
.main-navigation .main-nav ul li:hover>a:after,
.main-navigation .main-nav ul li.sfHover:hover>a:after {
content: “”;
display: block;
width: 100%;
border-bottom: 2px solid #e62a32;
position: relative;
top: -15px;
opacity: 1;
}.main-navigation .main-nav ul li[class*=”current-menu-“]>a:after {
border-bottom: 2px solid #184590;
}/* Force menu item to width of text */
.fl-builder-content nav ul li a {
display: inline-block;
}
/* Create hidden underline on all menu items but hide it */
.fl-builder-content nav ul li a:after {
content: “”;
display: block;
width: 100%;
border-bottom: 2px solid #e62a32;
top: 10px;
position: relative;
opacity: 0;
}
/* Change colors and show underline on hover and current */
.fl-builder-content nav ul li:hover>a:after {
border-bottom: 2px solid #e62a32;
top: 10px;
opacity: 1;
}
.fl-builder-content nav ul li[class*=”current-menu-“]>a:after {
border-bottom: 2px solid #e62a32;
top: 10px;
opacity: 1;
}Sorry, I did not mentioned in the previous post.
December 4, 2020 at 9:45 am #1567599DavidStaffCustomer SupportHi there,
add this CSS to move the Submenu underline to below the text:
.main-navigation .main-nav ul ul li:hover>a:after { top: 0; }
December 7, 2020 at 1:03 am #1570031AlbertoThank you David!
December 7, 2020 at 3:45 am #1570177DavidStaffCustomer SupportYou’re welcome
December 9, 2020 at 6:04 am #1572793AlbertoDear @David, I’m sorry to get back on that.
When we move with the mouse over the sub-menu, the underline moves on the text and it seems a “strike” text.
https://www.bfbinsurancebroker.com/agite/
The main menu voice is Associazioni.
Could you help us again?
Thanks in advance.
December 9, 2020 at 8:15 am #1573098DavidStaffCustomer SupportHmmm.. theres a few CSS conflicts going on there.
Could you remove the CSS you have added for the navigation underline effect and we’ll look at a better way of doing that.
December 9, 2020 at 8:22 am #1573107AlbertoThank you @David.
Moved away the css code added.
Colors on menu selection: #184590
Colors on menu active: #e62a32
(if helps)Thanks in advance indeed.
December 9, 2020 at 8:46 am #1573141DavidStaffCustomer SupportCan you remove this as well – its in the Customizer Additional CSS:
.main-navigation li a:after { opacity: 0; transition: opacity 500ms ease-in-out; content: ""; }
December 9, 2020 at 8:48 am #1573144AlbertoDone @David.
Sorry, I was convinced to have removed all.
December 9, 2020 at 8:54 am #1573154DavidStaffCustomer SupportNo problems ๐ Try this CSS:
@media (min-width: 769px) { .main-navigation .menu .menu-item>a::after { content: ""; position: absolute; right: 20px; left: 20px; bottom: 0; display: block; height: 2px; background-color: transparent; transition: 0.3s background-color ease; } .main-navigation .menu .menu-item.current-menu-item>a::after, .main-navigation .menu .menu-item.current-menu-ancestor>a::after, .main-navigation .menu .menu-item>a:hover::after { background-color: currentColor; } .main-navigation ul ul { padding-bottom: 20px; } }
December 10, 2020 at 6:20 am #1574303AlbertoWow… I’ll study your css to understand how you did that.
Works perfectly.Thank you again.
December 10, 2020 at 7:12 am #1574491DavidStaffCustomer SupportGlad to be of help ๐
-
AuthorPosts
- You must be logged in to reply to this topic.