css to adjust menu titles to two lines

Hello,

I'm working onthe menu on the site here http://waterways.clearlineinteractive.com/real-estate-services/.

My client wanted the menu titles to be on two lines so I titled them similar to this  PROBLEMS<span class="menu-break">& SOLUTIONS</span>

Then I added this css to make it on two lines and centered

span.menu-break {
display: block;
line-height: 0;
bottom: 35px;
position: relative;
}

#Top_bar #menu ul li a span {
text-align: center;
}

The problem is that this added a bunch on black space at the bottom of the menu. Is there a better way to do what I'm trying to do?

Thank you,

Neil

Comments

  • Hi,

    we have much easier solution to break words into the new line:

    PROBLEMS<br />&SOLUTIONS

    and no css is needed :) Just <br /> tag between them.
  • Thanks for the help. That worked great. I did add a bit of css to center each line over each other. 

    If you check out this link can you advice me how to remove the thin black section under the menu? I'd like the blue highlight line to be flush with the bottom of the black.

    Thanks,

    Neil
  • To move this line to the bottom of black menu's background, please use the following css:
    .menu-line-below #Top_bar .menu > li > a::after { bottom: -10px !important; }
  • You are like, the god of css! Thanks so much.

    Is there a way to get the home text to be centered top to bottom in the menu? If that's too much to ask please let me know. :)

    Thanks again!
  • It is possible of course but requires css customization as well because it's not a standard thing:
    #Top_bar .menu > li#menu-item-60 > a span:not(.description) { margin-top: 15px !important; }
    .menu-line-below #Top_bar .menu > li#menu-item-60 > a::after { bottom: -20px !important; }
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.