Advertisement

How to change the horizontal position of a submenu Topic is solved

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
antonios
Joomla! Explorer
Joomla! Explorer
Posts: 352
Joined: Fri Jun 20, 2008 2:22 pm

How to change the horizontal position of a submenu

Post by antonios » Thu Dec 12, 2024 9:02 pm

Hi,
how can I tell Joomla 5 to display the submenus of a dropdown menu some distance to the right of where they are displayed by default?
menu.png
For example, I'd like to displace the submenu in the image so that its left border it becomes aligned with the "R" of the Recursos dropdown menu
This is the https://permacultura-es.org/Joomla4/
You do not have the required permissions to view the files attached to this post.

Advertisement
User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10421
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: How to change the horizontal position of a submenu

Post by AMurray » Thu Dec 12, 2024 9:37 pm

Do you mean align the menu to come under the heading? I thought you meant move menu items to another menu.

That would be done with CSS, but depends on what template you use - it might be easier seeking support from the Template developer.

To find the CSS, right click the menu and "Inspect" which will open your browsers developer tools. that should identify the CSS class.

Then add custom css to whatever file or method is used by the template (looks like Astroid framework, "Template Two" is the template name). Adding custom CSS might be done by one or two methods e.g. in the template configuration it may have a place for custom code specifically or you might need to create a file such as 'custom.css'. here's a starting point: https://docs.astroidframe.work/custom-code/custom-css
Regards - A Murray
General Support Moderator

mtgg
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 111
Joined: Thu Apr 04, 2024 11:17 pm

Re: How to change the horizontal position of a submenu

Post by mtgg » Thu Dec 12, 2024 10:12 pm

Issue caused by inline CSS:

Code: Select all

<div style="width: 320px; max-width: 1296px; left: -178.3px; top: 65px; display: none;" class="megamenu-container nav-submenu-container nav-item-level-1">
Create a custom CSS file that looks like this:

Code: Select all

.megamenu-container {
    left:  0 !important;
}

antonios
Joomla! Explorer
Joomla! Explorer
Posts: 352
Joined: Fri Jun 20, 2008 2:22 pm

Re: How to change the horizontal position of a submenu

Post by antonios » Thu Dec 12, 2024 11:51 pm

Hi,
Thank you both! Now I am set.
Best regards

Advertisement

Post Reply

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