Site logo

Archived topic

Css line break - menu

9 replies · Started by marketingeszkozok on June 16, 2016

Viewing posts 1–10 of 10

Hmm, not sure it will work, but worth trying.

Add this CSS:

.main-navigation .main-nav ul li a, 
.menu-toggle, .main-navigation .mobile-bar-items a {
    line-height: inherit;
    padding-top: 10px;
    padding-bottom: 10px;
}

Adding CSS: https://generatepress.com/knowledgebase/adding-css/

Then you'll need to add a line break into your Navigation Label in "Appearance > Menus" like this: <br />

I copied.
It's not working.

Other ideas?

Did you add the line breaks to your menu items? I'm not seeing them on your site.

This was missing. :)
Thanks!

How can I put into the middle?
It should be the same on both sides.
http://prntscr.com/bhfbzh

Have you tried setting the Navigation Alignment to Center in "Customize > Layout"?

Hmm, as far as I know there's really no good way to do that. If you want to do the two line thing you'll have to apply it to all items.

You can ask over on http://stackoverflow.com/ to see if anyone else has any ideas.

Hello Tom,
Some of our menu items are two words. I have added the CSS shown here and with the line break it correctly separates the words. However it puts the first word above the menu line rather than the second word below the menu line where I want it. Have you any suggested mods to the CSS Please?

Thanks
Nev.

Hi there,

can you raise a new topic where you can share a link to the site in the Private Info box and we can take a look

This archived topic is closed to new replies.