Advertisement

How to create two lines of items in the Main Menu

General questions relating to Joomla! 5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
Peace Freak
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Fri Aug 17, 2007 2:24 am

How to create two lines of items in the Main Menu

Post by Peace Freak » Sat Mar 15, 2025 1:31 am

I'm in the process of converting a non-Joomla site to Joomla. The old site has a side menu with 12 items. I would like to put those items in the Main Menu, so that when viewed on a mobile device, they appear in the mobile hamburger menu. This will make navigating the site easy...

I added the 12 items to the Main Menu, but on my computer screen, as there are so many, they go off the right edge of the screen.

Is there a way to get them to wrap so that they form two lines that adjust to the width of the browser window?

Thank you!

Advertisement
User avatar
stutteringp0et
Joomla! Ace
Joomla! Ace
Posts: 1482
Joined: Sat Oct 28, 2006 11:16 pm
Location: Texas
Contact:

Re: How to create two lines of items in the Main Menu

Post by stutteringp0et » Sat Mar 15, 2025 2:07 am

depends on the template you're using. In Cassiopeia, you can choose a custom layout for the menu module which enables all of the bootstrap collapsing hamburger menu features.

Peace Freak
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Fri Aug 17, 2007 2:24 am

Re: How to create two lines of items in the Main Menu

Post by Peace Freak » Sat Mar 15, 2025 2:56 am

Thank you for your response. I'm using Cassiopeia...

In Content/Site Modules/Main Menu/Advanced I have chosen Collapsible Dropdown.

Could you be more specific as to where to find the custom layout options.

Thank you!

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1870
Joined: Tue Jun 30, 2020 12:17 pm

Re: How to create two lines of items in the Main Menu

Post by Pavel-ww » Sat Mar 15, 2025 6:34 am

Peace Freak wrote: Sat Mar 15, 2025 1:31 am Is there a way to get them to wrap so that they form two lines that adjust to the width of the browser window?
Hi. I don't think the existing layout settings of the module can solve this problem. It can only be done through CSS. Please provide the URL of your website. Without this, it is impossible to help.

jasmineara
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Mar 15, 2025 6:46 am

Re: How to create two lines of items in the Main Menu

Post by jasmineara » Sat Mar 15, 2025 6:51 am

This CSS will make the menu items wrap and adjust their layout depending on the screen width. You might need to tweak the "flex" values depending on your desired design, but this should get you started!

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31733
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: How to create two lines of items in the Main Menu

Post by Per Yngve Berg » Sat Mar 15, 2025 10:36 am

Would it not make more sense to group them into sub-menus?

Advertisement

Post Reply

Return to “General Questions/New to Joomla! 5.x”