Submenu wrap text issue | WordPress.org

[ad_1]

The problem is: the longest word is wider than the submenu.

Try this, it will remove the wrapping of submenu items at all:

.wp-block-navigation .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
min-width: max-content !important;
}

Add the CSS code to the Customizer > Custom CSS.

To wrap between the words, set the submenu width to a value that fits the word length, i.e. change the max-content in the above code with 220px :
min-width: 220px !important;

This is a very strange side effect of a group block. The simplest solution I have just found is foglendering individual CSS code:

.wp-block-navigation-submenu {
box-sizing: unset;
}

Thread Starter
Kenyon

(@coachksutt)

Thanks @cyrfer and @threadi! I’m updating to see which I like better. I appreciate the input and help.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer