Archived topic
Adaptting primary subnavigation block width to subitems width
5 replies · Started by Mildmac SA (ESA78960895) on July 30, 2017
Hi,
i added this CSS to increase primary subnavigation block width, but in a fixed way (to, let´s say, 340px)
.main-navigation ul ul {
width: 340px;
padding-top: 0px;
}
But the subitems width is different in each main menu item. How can I adapt the block width to the maximum text subitem width?
Hi there,
Try this: https://generatepress.com/forums/topic/sub-menu-item-width/#post-310762
Thanks Leo, but doesn´t work, because with 100% it inherits the parent item width, but from main menu. I want to adapt the width of the dropdown block to the width of the longest subitem in that block. I send you a capture to show:
http://sibcont.com/wp-content/uploads/2017/07/capture.jpg
I don´t know if it is possible...
Thanks
Rafael
Here's the one you're looking for: https://generatepress.com/forums/topic/submenu-auto-width/#post-343513
Great!!!! That´s it!!! Thanks a lot Tom
You're welcome :)