Page 1 of 1

Width of submenu items

Posted: 04 Feb 2023, 21:38
by JMM
Hello, Karl,

On THIS site, when you click on Galleries, notice all the wasted space for each menu item, which causes the menu to run off the right side of the screen, preventing me from seeing further menu items.

Is there a way that I can shorten the width of each column, so that the column width is slightly wider than the widest menu item?

On that same site, for the About pull-down menu, the width is basically slightly larger than the widest item.

Thank you in advance & have yourself a great day.

Regards,
John

Re: Width of submenu items

Posted: 04 Feb 2023, 22:18
by mjau-mjau
JMM wrote:On THIS site, when you click on Galleries, notice all the wasted space for each menu item, which causes the menu to run off the right side of the screen, preventing me from seeing further menu items.
Generally, the submenu widths are all expanded to match the widest width, so that the menu feels more symmetric. In your case, the folder structure is perhaps a bit "unfortunate" for this kind of menu. One could argue that this deep non-symmetric menu structure would be better suited for the sidebar menu. There is a solution:
JMM wrote:Is there a way that I can shorten the width of each column, so that the column width is slightly wider than the widest menu item?
Try to add the following to Settings > Custom > Custom CSS:
Code
ul.dropdown {
  min-width: auto !important;
}
Below is screenshot after fix. Even with the fix, dropdown menu isn't very well suited for this kinda depth. It's a bit clumsy for the user to navigate.
Image
JMM wrote:On that same site, for the About pull-down menu, the width is basically slightly larger than the widest item.
Yes, because the menu only needs to take into consideration the widest item in that single-level dropdown.

Have yourself a great Sunday!

Re: Width of submenu items

Posted: 05 Feb 2023, 05:25
by JMM
It works perfectly now, with your custom css code... thank you, sir.

Hopefully I will not need to add any more levels.