Hover and Menu Link Problem-ish? Topic is solved

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
zema2023
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Feb 07, 2023 2:17 pm

Hover and Menu Link Problem-ish?

Post by zema2023 » Tue Feb 07, 2023 3:03 pm

Good day all,

I am new to Joomla and not very experienced with coding. I would like to customize the menu of the default Joomla 4 template to include smoother dropdown menus. Instead of requiring a mouse hover for each dropdown, I would like to be able to click on one dropdown menu and see the rest of the dropdowns using a mouse hover. Additionally, I would like to add dividers and reduce the size of the dropdown menu box. Could someone please help me with this?

Thank you.
Last edited by pe7er on Tue Feb 07, 2023 5:02 pm, edited 1 time in total.
Reason: Split from other topic. Please do not add new topics to existing ones.

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

Re: Hover and Menu Link Problem-ish?

Post by Pavel-ww » Tue Feb 07, 2023 3:54 pm

zema2023 wrote:
Tue Feb 07, 2023 3:03 pm
Good day all,

I am new to Joomla and not very experienced with coding. I would like to customize the menu of the default Joomla 4 template to include smoother dropdown menus. Instead of requiring a mouse hover for each dropdown, I would like to be able to click on one dropdown menu and see the rest of the dropdowns using a mouse hover. Additionally, I would like to add dividers and reduce the size of the dropdown menu box. Could someone please help me with this?

Thank you.
Hi. This will require significant coding on base of menu module with Default layout. If you are not very experienced in this, just use some kind of framework-template. For example, Helix Ultimate - there it is from the box.

zema2023
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Feb 07, 2023 2:17 pm

Re: Hover and Menu Link Problem-ish?

Post by zema2023 » Tue Feb 07, 2023 5:35 pm

Pavel-ww wrote:
Tue Feb 07, 2023 3:54 pm
zema2023 wrote:
Tue Feb 07, 2023 3:03 pm
Good day all,

I am new to Joomla and not very experienced with coding. I would like to customize the menu of the default Joomla 4 template to include smoother dropdown menus. Instead of requiring a mouse hover for each dropdown, I would like to be able to click on one dropdown menu and see the rest of the dropdowns using a mouse hover. Additionally, I would like to add dividers and reduce the size of the dropdown menu box. Could someone please help me with this?

Thank you.
Hi. This will require significant coding on base of menu module with Default layout. If you are not very experienced in this, just use some kind of framework-template. For example, Helix Ultimate - there it is from the box.
Hi,

Thanks a lot for your quick response and recommendation.

Thanks

zema2023
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Feb 07, 2023 2:17 pm

Re: Hover and Menu Link Problem-ish?

Post by zema2023 » Tue Feb 07, 2023 5:44 pm

zema2023 wrote:
Tue Feb 07, 2023 5:35 pm
Pavel-ww wrote:
Tue Feb 07, 2023 3:54 pm
zema2023 wrote:
Tue Feb 07, 2023 3:03 pm
Good day all,

I am new to Joomla and not very experienced with coding. I would like to customize the menu of the default Joomla 4 template to include smoother dropdown menus. Instead of requiring a mouse hover for each dropdown, I would like to be able to click on one dropdown menu and see the rest of the dropdowns using a mouse hover. Additionally, I would like to add dividers and reduce the size of the dropdown menu box. Could someone please help me with this?

Thank you.
Hi. This will require significant coding on base of menu module with Default layout. If you are not very experienced in this, just use some kind of framework-template. For example, Helix Ultimate - there it is from the box.
Hi,

Thanks a lot for your quick response and recommendation.

Thanks
Hi again,

I came across the code below that I am testing in my user.css file to control mouse hover dropdown menu, but somehow, the separator on the menu does not change color with mouse hover. I wonder what I am missing?

Code: Select all

/* Hover Drop Down Menu */
.mod-menu {
  background-color: inherit;
}

.mod-menu a {
  float: left;
  font-size: 16px;
  color: inherit;
  text-align: left;
  padding: 0px 8px;
  text-decoration: none;
}

.mod-menu a:hover, .dropdown:hover {
  background-color: red !important;
  color: white;
}

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

Re: Hover and Menu Link Problem-ish?

Post by Pavel-ww » Wed Feb 08, 2023 6:29 am

zema2023 wrote:
Tue Feb 07, 2023 5:44 pm
... but somehow, the separator on the menu does not change color with mouse hover. I wonder what I am missing?
Hi. In your CSS is not a code for the separator. The separator is not <a> tag, but usually it is <span> tag. Learn the code using your browser Dev Tools to make sure.

zema2023
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Feb 07, 2023 2:17 pm

Re: Hover and Menu Link Problem-ish?

Post by zema2023 » Wed Feb 08, 2023 10:51 am

Pavel-ww wrote:
Wed Feb 08, 2023 6:29 am
zema2023 wrote:
Tue Feb 07, 2023 5:44 pm
... but somehow, the separator on the menu does not change color with mouse hover. I wonder what I am missing?
Hi. In your CSS is not a code for the separator. The separator is not <a> tag, but usually it is <span> tag. Learn the code using your browser Dev Tools to make sure.
Hi,
Yes, I tried that already.
The following was what I got on Dev Tools when I clicked over the separator:

Code: Select all

<button class="mod-menu__heading nav-header mm-collapsed mm-toggler mm-toggler-nolink" aria-haspopup="true" aria-expanded="false"><span class="p-2 fa fa-calculator" aria-hidden="true"></span>Calculators</button>
So I tried applying the code below, but there was no change:

Code: Select all

.mod-menu__heading:hover, .nav-header:hover, .mm-collapsed:hover, .mm-toggler:hover, .mm-toggler-nolink:hover {
  background-color: red;
  color: white;
}
For as long it is a separator, the color does not change when hovering over it. But when I switch it to a link, then the color changes. And my problem is that I don't want to switch it to a link when it supposed to be a separator.

Something I am doing wrong.

zema2023
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Tue Feb 07, 2023 2:17 pm

Re: Hover and Menu Link Problem-ish?

Post by zema2023 » Wed Feb 08, 2023 1:59 pm

zema2023 wrote:
Wed Feb 08, 2023 10:51 am
Pavel-ww wrote:
Wed Feb 08, 2023 6:29 am
zema2023 wrote:
Tue Feb 07, 2023 5:44 pm
... but somehow, the separator on the menu does not change color with mouse hover. I wonder what I am missing?
Hi. In your CSS is not a code for the separator. The separator is not <a> tag, but usually it is <span> tag. Learn the code using your browser Dev Tools to make sure.
Hi,
Yes, I tried that already.
The following was what I got on Dev Tools when I clicked over the separator:

Code: Select all

<button class="mod-menu__heading nav-header mm-collapsed mm-toggler mm-toggler-nolink" aria-haspopup="true" aria-expanded="false"><span class="p-2 fa fa-calculator" aria-hidden="true"></span>Calculators</button>
So I tried applying the code below, but there was no change:

Code: Select all

.mod-menu__heading:hover, .nav-header:hover, .mm-collapsed:hover, .mm-toggler:hover, .mm-toggler-nolink:hover {
  background-color: red;
  color: white;
}
For as long it is a separator, the color does not change when hovering over it. But when I switch it to a link, then the color changes. And my problem is that I don't want to switch it to a link when it supposed to be a separator.

Something I am doing wrong.
Hello there,
I finally got it right.
I only had to use the item in question to fix the problem.

Here is the code I used:

Code: Select all

.metismenu-item:hover {
  background-color: red;
  color: white;
}


Thanks a lot.


Post Reply

Return to “Templates for Joomla! 4.x”