Horizontal menu, split text over 2 line when the width of the item is fixed

When text are too long in the MenuTree, the text is automatically split over 2 lines without special item style.

image

With the Horizontal Menu, if we want limit the width of the item, the text is not split over 2 lines. Is there a way to achieve this ?

wordWrap = break-word

has no effect

image

image
add this in the stylesheet

.horizontal-menu-menu-item span{
  white-space: pre-wrap !important;
  word-break: break-word;
  margin:auto;
  justify-content: center;

}

(optional: text-align: center; )

OR with a class added to the item style if you only want it on specific items

.psc-SomeCustomClass span{
  white-space: pre-wrap !important;
  word-break: break-word;
  margin:auto;
  justify-content: center;
 
}
2 Likes