Keeping a dropdown open
-
Is there a way to keep a dropdown menu open on a specific page?
I’m running Headway Themes if that helps.
-
Let’s see your website
Which dropdown menu are you referring to?
The one for SHOP.
If you’re not using a Child Theme, and if the theme doesn’t have a designated section of the dashboard for CSS modifications then do the following:
- Install this Custom CSS Manager plugin http://ww.wp.xz.cn/plugins/custom-css-manager-plugin
- use its “CSS Code” section of the dashboard to hold your CSS modifications:
-
(put this code in)
.page-id-n .block-type-navigation ul.sub-menu { position: static; } - Save
Replace page-id-n with page-id-(your actual page id).
Check what happens on mobile.Alternatively use your Child Theme style.css file to hold your CSS modifications
That makes it appear for just a second while the page loads. Once the page is done loading it’s no longer visible.
Try this instead:
.page-id-n .block-type-navigation ul.sub-menu { position: static; display: block !important; opacity: 1 !important; }That works, but it also causes all of the items in the navigation bar to shift down and line up with the last item in the drop down.
Can you show a page with the problem?
Oh, try this instead:
.page-id-n .block-type-navigation ul.sub-menu { left: auto !important; display: block !important; opacity: 1 !important; }Perfect! Thanks for all the help!
On second thought…
How would I adjust this to make the menu horizontal? I tried the following, which makes the mun horizontal on hover…although I am having spacing issues.
When I take that code and add it to page I want the menu visible on (or just replace the existing code) it doesn’t work. Either the menu stays vertical or disappears entirely.
.block-type-navigation li:hover ul.sub-menu li { display: inline !important; float: left; width: 20% !important; }Are you having caching issues? On my end I see your CSS applied
It’s applied, but it’s not working. How do I make the static menu on this page horizontal?
The topic ‘Keeping a dropdown open’ is closed to new replies.