Ubermenu - Dropdown width equal to parent item

Hi,

Referring to the attached URL, is it possible to set the width of the dropdown menu ( under Publications & Research ) to match the width of the Top Level item?

I’ve been trying for ages but can’t get it to work. I’m probably overlooking something very simple !

Many thanks
Mark

Hello Mark,

Thanks for asking. :slight_smile:

Please add following CSS under X > Theme Options > CSS:

.ubermenu-main .ubermenu-submenu.ubermenu-submenu-drop {
    width: 230px;
}

1- I have found the proper CSS code selector using the Chrome browser Developer Toolbar: https://www.youtube.com/watch?v=wcFnnxfA70g

2- For the CSS code itself, I suggest that you get started with this tutorial: https://www.youtube.com/watch?v=yfoY53QXEnI

Thanks.

Hi Prasant,

Many thanks for the reply. Perhaps I should have been a little clearer in my original post. I’m already very familiar with the Developer Tools and CSS but I was hoping to achieve this without using fixed widths in case I have to add further drop-down menus. I thought I may have overlooked a setting somewhere - so many configuration options in Ubermenu it can get a little confusing !

Hi again,

Please checkout https://sevenspark.com/docs/ubermenu-3/settings/submenu/width

Hope this helps!

Thanks Nabeel. I read through the suggested article before starting this thread. Unfortunately it doesn’t really help. It would appear what I’m trying to do isn’t possible, which seems a little crazy. I just want a simple single column drop down menu that lines up with the parent item.

If the solution is to manually set the width of each drop-down menu, this can be done from within Ubermenu. No need for custom CSS.

Hi Marky,

Yes, it seems the UberMenu has no option for that. You’re going to need a custom jQuery for that to calculate the width of submenu base on the parent menu. Regretfully, this falls under custom development and would be outside the scope of support we can offer.

Thanks for understanding,

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.