- This topic has 32 replies, 8 voices, and was last updated 6 years, 6 months ago by
Leo.
-
AuthorPosts
-
June 29, 2015 at 7:51 am #117341
Martin
I’ve ended up with a long drop down list off one of the main menu options, how can I get the sub-menu to appear in two columns? I have a custom CSS plugin so just need to know what the magic code would be.
June 29, 2015 at 9:49 am #117379Tom
Lead DeveloperLead DeveloperHmm, I’m afraid there’s no magic code for that.
If you need to have that many links in your nav, you may need to use a mega menu: https://wordpress.org/plugins/megamenu/
June 30, 2015 at 12:52 am #117578Martin
Would something like this work?
http://www.prowebdesign.ro/wordpress-sub-menu-items-split-in-2-columns-the-easy-way/
June 30, 2015 at 2:12 am #117583Damiaan van Vliet
Tip: yesterday I installed max megamenu plug-in and works with GeneratePress; first look the video tutorial.
With that it is easy to have a two, three, four columns menu.Bye.
June 30, 2015 at 9:07 am #117644Tom
Lead DeveloperLead DeveloperThat could definitely work, Martin 🙂
Thanks for the tip, Damiaan!
November 17, 2016 at 7:30 am #245168brickintime
The code from Martin really sounded interesting, but unfortunately didn’t work for me. Sadly I can’t figure out where the problem is.
http://thebricktime.de/ is the site and the menu I am trying to get in two columns is “bricksites”.
November 17, 2016 at 9:09 am #245214Tom
Lead DeveloperLead DeveloperJust took another look at that code and it should definitely work.
Can you implement the tutorial and let me know so I can inspect your site?
November 17, 2016 at 9:29 am #245228brickintime
Yes, I also think it should work, but it doesn’t.
It’s still implemented, I didn’t took it out.
November 17, 2016 at 12:39 pm #245308Tom
Lead DeveloperLead DeveloperI’m not seeing the menu item classes added to those menu items?
November 18, 2016 at 3:21 am #245508brickintime
I added the css-class to bricksites in the main menu.
November 18, 2016 at 9:07 am #245607Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
November 18, 2016 at 10:39 am #245651brickintime
Hm…
It didn’t workNovember 18, 2016 at 8:17 pm #245756Tom
Lead DeveloperLead DeveloperI’m not seeing the classes added: http://www.screencast.com/t/AAzvkAoSCOx
December 1, 2016 at 6:35 am #250202brickintime
Okay, I thought you just need to add the css to the parent link. I added the css-class “sub-menu-columns” now the every sub-menu link, but it’s still not working
And that’s what I put in the css
.sub-menu { width: 410px; } .sub-menu-columns ul.sub-menu li { display: inline-block; float: left; width: 200px; } .sub-menu-columns ul.sub-menu li:nth-child(odd) { float: left; margin-right: 10px; } .sub-menu-columns ul.sub-menu li:nth-child(even) { float: right; }December 1, 2016 at 9:59 am #250267Tom
Lead DeveloperLead DeveloperTry this as the CSS:
.main-navigation ul ul.sub-menu { width: 410px; } ul.sub-menu li.sub-menu-columns { display: inline-block; float: left; width: 200px; } ul.sub-menu li.sub-menu-columns:nth-child(odd) { float: left; margin-right: 10px; } ul.sub-menu li.sub-menu-columns:nth-child(even) { float: right; } -
AuthorPosts
- You must be logged in to reply to this topic.