Hi,
I'm trying to set up a Cassiopeia template so that the dropdown menu responds to a mouseover ([ redacted ]). I would also like to expand menu after mouseover the name of the menu (not only down/up arrow).
Thanks
Advertisement
Cassiopeia Template Hover Menu
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.
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.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Aug 25, 2021 9:00 am
Cassiopeia Template Hover Menu
Last edited by toivo on Sat Mar 19, 2022 11:04 am, edited 1 time in total.
Reason: mod note: removed URL to non-Joomla website
Reason: mod note: removed URL to non-Joomla website
Advertisement
-
- Joomla! Apprentice
- Posts: 18
- Joined: Fri Jan 31, 2020 3:47 pm
Re: Cassiopeia Template Hover Menu
Hi janbabjan,
Follow some bellow steps to show sub-menu.
- Step 1. Create a file with named custom.css in the css folder.
- Step 2. Add bellow code to the index.php file.
- Step 3. Add bellow css code to the custom.css file.
- Step 4: Reload your website to view all changes.
Best regards,
Follow some bellow steps to show sub-menu.
- Step 1. Create a file with named custom.css in the css folder.
- Step 2. Add bellow code to the index.php file.
Code: Select all
<head>
<jdoc:include type="metas" />
<jdoc:include type="styles" />
<jdoc:include type="scripts" />
<link rel="stylesheet" href="<?php echo JURI::root(); ?>/templates/cassiopeia/css/custom.css">
</head>
Code: Select all
.header .mod-menu > li {
position: relative;
}
.header .mod-menu li:hover > ul {
background-color: #fff;
border: 1px solid #dfe3e7;
border-radius: 5px;
display: block;
position: absolute;
top: 100%;
left: 0;
min-width: 250px;
padding: 16px;
}
.header .mod-menu li:hover > ul li {
display: block;
}
Best regards,
- Pavel-ww
- Joomla! Ace
- Posts: 1872
- Joined: Tue Jun 30, 2020 12:17 pm
Re: Cassiopeia Template Hover Menu
Hi.
Why do it? You just need create a file named user.css. It's all. Editing index.php is not required. This file is already included there out of the box.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Fri Jan 31, 2020 3:47 pm
Re: Cassiopeia Template Hover Menu
@Pavel-ww,
I tested and it worked fine. Thank you very much.
@janbabjan,
Please create the user.css file after that add all css rules to the user.css file (you don't need to edit any code in index.php file).
I tested and it worked fine. Thank you very much.
@janbabjan,
Please create the user.css file after that add all css rules to the user.css file (you don't need to edit any code in index.php file).
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sat Sep 04, 2021 2:50 am
Re: Cassiopeia Template Hover Menu
- Pavel-ww
- Joomla! Ace
- Posts: 1872
- Joined: Tue Jun 30, 2020 12:17 pm
Re: Cassiopeia Template Hover Menu
Hi. You quoted the wrong person. I did not offer any solutions for this. My opinion - the click behavior should not be changed to mouseover behavior. Since this contradicts the norms of accessibility
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sat Sep 04, 2021 2:50 am
Re: Cassiopeia Template Hover Menu
Advertisement