Hey there shandycreative,
Hope you’re well today!
This should be possible to do with some custom CSS. You can try adding the following code to Appearance >> Theme Options >> Custom CSS:
.main-navigation ul ul {
max-width: 100px;
}
.main-navigation ul ul a {
min-width: 70px;
max-width: 100px;
}
This should reduce the submenu to 100px in widht. If this doesn’t work could you please post link to your site so I can take a look?
Hope this helps π
Best regards,
Bojan
Thanks so much. I’ll add this code and hopefully won’t need to pester you again. π
Hey again,
Please let me know how that goes π
Cheers,
Bojan
Worked perfectly. I tweaked the min/max pixel number to fit what I had in mind, but this was the answer.
Thanks so much!!!
Don’t shoot me….I just thought of one other thing in regards to this. How can I get the text to be “centered” in the drop down menu box? That would be really helpful. π
TIA
Hey again TIA,
Glad you managed to get that going for you π
Please try adding the following CSS code:
.main-navigation ul ul li a {
text-align: center;
}
This should center the links in the navigation dropdown. If this doesn’t work please post link to your site so I can check it out.
Hope this helps π
Cheers,
Bojan
It worked great on one of the dropdowns items and not on the other. Weird.
Here’s the link: http://shandywordpress.com/
Thanks
Hey again,
I’ve tried to check your site but it appears that you have one of the maintenance plugins activated so I’m unable to see anything there π
Could you please disable the plugin so I can check it out?
Best regards,
Bojan
Hey again,
This happens because the text is larger then the actual max width of the item. Please try adding this CSS for that specific item:
li#menu-item-96 a {
max-width: inherit;
padding: 12px 0 !important;
}
Please let me know if this helps π
Best regards,
Bojan
Worked like a charm!! Thanks so much. I’ll try to behave going forward. π
I’m sorry…it’s me again. I’m still having an issue with the centering of text in a menu. See “Affilitations” which is drop down to “About Us” on http://shandywordpress.com/
In addition, can you help resize the other drop down menu which come Under “Products”, then under “Prescription Products”. Those menu items are just too narrow?
Sorry to be such a pest.
Hey again shandycreative,
Please try adding the following CSS code:
li#menu-item-255 a {
padding-left: 10px!important;
min-width: 60px;
}
.main-navigation ul ul ul {
min-width: 80px;
}
This should center the about sub menu and increase width of the prescription products sub menu.
Please let me know if this helps π
Cheers,
Bojan