Avoid wrapping of Menu items


Note :This snippet works only with the Classical style option. The Classical style option can be enabled in Appearance > Customize > Advanced > Theme Style. More about the theme style option here


Last Reviewed: 29-Mar-14

If you need to avoid wrapping of Menu items:

Where to copy/paste this code?
The simplest way is to use the Custom CSS section of the customizer option screen. If you have many customizations to make in CSS and PHP, then we strongly recommend you create a child theme. Everything you need to know about creating a child theme with Customizr here.

 
Credit: @ludwigt


Related Snippets you may also like


8 thoughts on “Avoid wrapping of Menu items

  • Bob

    Found this link in the Forum and added a missing bracket and changed a text size to em rather than px. Play with the 2nd and the 4th padding values and font size (remember “em” can be 1 or 1.2 or 1.5 or 2, not just whole integers.

  • Dave Bardell Post author

    I’d suggest the Forum would be a better place to get a solution for this. You’ll get a much wider audience. This isn’t my code, and I’ve not used it before.

    Hope that helps.

  • Marcus

    I think that the directive nowrap only stops wrapping multiple words within the same menu item. E.g. “About us”: the 2 words will not wrap.

  • Dan

    Hi,

    I have the same problem as Stacey, I have tried the code but the text is still wrapping. Please can you help?

    Thanks!

  • Stacey

    Hi,

    I have tried putting the above code into the custom css and my very last menu item is still wrapping to the next line. How would I prevent this?

    Thanks.

Comments are closed.