problems with CSS Menu Designer

User 127801 Photo


Registered User
55 posts

prepared a menu using the CSS Menu Designer but some of my entries in the root items of the menu were too long for one line and were therefore spread over two lines. The result is that the root menu looks weird because some items have one line of text and are one line deep and some have two lines of text and are two lines deep. Does anyone know how I can manually adjust the code in the CSS file and in the html list on the web page to make the boxes with the single line items the same depth as the boxes with two line items?
User 187934 Photo


Senior Advisor
20,266 posts

I use some inline styling.:)
<li style="width:250px;"><a href="http://myawesomesite.com">My Awesome site</a></li>
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 38401 Photo


Senior Advisor
10,951 posts

Hiya Ian,

You can easily do this by altering the css file for your menu. Find the line that has your main menu code on it and give the

.menu-menu li a

part of that code a specific height setting. Usually height settings aren't something you want to give, but in this case I think it's pretty necessary if you want to have it the same depth. The other option would be to give it a wider width for the

.menu-menu li a

tags so that all the menu items stay on one line instead of 2, but that all depends on if they will fit horizontally so if you have too many items, then the 2 line method you're doing might be the most efficient.

I believe the code you'll need to change in your menu-menu.css file (or whatever you may have named it) is:

.menu-menu li a {
text-align:left;
}

Just add the height to that and it should be good such as

.menu-menu li a {
text-align:left;
height: 25px;
}

Obviously adjust the height to what you need :)
User 187934 Photo


Senior Advisor
20,266 posts

Ian isn't looking for height. Their looking to widen one of the sub menus because the words are longer and it's forcing them to wrap. I had this on a menu and the designer only lets you set one width. I only needed one sub-menu widened so I used inline styling because I didn't want the all the rest of my sub-menus widened.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 38401 Photo


Senior Advisor
10,951 posts

Ian Swindale wrote:
Does anyone know how I can manually adjust the code in the CSS file and in the html list on the web page to make the boxes with the single line items the same depth as the boxes with two line items?


:P
User 187934 Photo


Senior Advisor
20,266 posts

oops:) Sorry
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 127801 Photo


Registered User
55 posts

Thanks, Jo Ann, I'll give that a try.
User 127801 Photo


Registered User
55 posts

I've done what Jo Ann suggested and it worked but it has created a new problem. The top of the sub-menu opens over the bottom part of the main root menu rather than immediately below it. I've looked hard at the CSS coding but I'm too new to CSS to be able to work out how I can move the point at which the sub-menu opens so that it is flush with the bottom of the main menu. Any ideas, anyone?
User 127801 Photo


Registered User
55 posts

Sorry, there's one other problem, too. the single line entries appear level with the top line of the two line entries. Any ideas how to make them appear level with the bottom line of the two line entries? I promise you I've ordered a book to teach me CSS!!!
User 38401 Photo


Senior Advisor
10,951 posts

have you uploaded it yet? If so, give a link please, much easier to see what you mean if we can see it at this point. Glad the other part worked though :)

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.