- This topic has 7 replies, 4 voices, and was last updated 1 year, 1 month ago by David.
-
AuthorPosts
-
June 25, 2022 at 5:05 pm #2264424ammgbr
Hello,
I have used the navigation block to insert multiple menus within my context.
I wanted to have a central means of changing the menu, submenu text colour, colour on hover, background colour , background colour on hover, font type etc. I want to avoid having to change the settings for each navigation block as there are a few. Also, I appreciate that the customizer options did not work as intended as they are meant for the primary menu. Is there a css to handle the customisation of the navigation block?Many thanks.
June 26, 2022 at 3:28 am #2264673DavidStaffCustomer SupportHi there,
try this CSS:
/* Styles for all items */ .wp-block-navigation .wp-block-navigation-item__content { font-size: 15px; color: #f00; background-color: #0f0; } .wp-block-navigation .wp-block-navigation-item__content:hover { color: #0f0; background-color: #ff0; } /* styles specifically for sub menu items */ .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 12px; color: #00f; background-color: #f00; } .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { color: #00f; background-color: #0f0; }
June 26, 2022 at 1:12 pm #2265131ammgbrMany thanks David that works well!
May I clarify also whether it is possible to have rounded corners around the menu?
Lastly, what is the best way to change font type?Apologies for the multiple Qs, happy to create a new ticket if needed
EDITED
Have found how to change fonts and adjust height:) I have done so via Customizer>Typography by amending the ‘buton’ section, if gives off the typography settings to the navigation menu block
I only need to find out how to make the submenu corners a bit rounded
June 26, 2022 at 8:19 pm #2265296Fernando Customer SupportHello there,
Here’s a CSS you may try adding in Appearance > Customize > Additional CSS:
ul.wp-block-navigation__submenu-container > li.wp-block-navigation-item:first-of-type > a { border-radius: 10px 10px 0 0; border: 1px solid rgba(0,0,0,.15) !important; border-bottom: none !important; } ul.wp-block-navigation__submenu-container > li.wp-block-navigation-item:last-of-type > a { border-radius: 0 0 10px 10px; border: 1px solid rgba(0,0,0,.15) !important; border-top: none !important; } ul.wp-block-navigation__submenu-container > li.wp-block-navigation-item:not(:first-of-type):not(:last-of-type) > a { border: 1px solid rgba(0,0,0,.15) !important; border-top: none !important; border-bottom: none !important; } ul.wp-block-navigation__submenu-container { border: none !important; }
Hope this helps!
June 27, 2022 at 3:59 pm #2266343ammgbrMany thanks that works!
June 27, 2022 at 5:25 pm #2266363Fernando Customer SupportYou’re welcome!
February 28, 2023 at 3:09 am #2549671StefanieHi there,
I just found this post because I have a very similar question.
I am looking for a way to highlight the active/current link in the navigation block with color. Is there a way to do this?Thank you!
February 28, 2023 at 7:32 am #2549959DavidStaffCustomer SupportHi there,
can i see the site you want to apply this too?
If need be, raise a new topic where you can access the Private information field for sharing the URL -
AuthorPosts
- You must be logged in to reply to this topic.