- This topic has 17 replies, 3 voices, and was last updated 7 years, 5 months ago by
Leo.
-
AuthorPosts
-
December 20, 2017 at 7:30 am #453844
Bjoern Christian
Hello,
we do have a Problem: our side consists of a menue leading to an ancor within a large top to down page. But we do also have some single pages (Projects f.e.) that Show up a content outside the ancor page. The Problem:
If we are within the ancor page, the mouseover-highlightening of the menue is working only for the single page menue entries. If we are within a single page the highlightening works only for the menue entries leading to the ancor page.
What could this be?
December 20, 2017 at 7:31 am #453845Leo
StaffCustomer SupportHi there,
Can you provide a link to your site?
December 20, 2017 at 9:15 am #453927Bjoern Christian
December 20, 2017 at 2:48 pm #454160Leo
StaffCustomer SupportIf I understand you correctly, you want to set a hover color for current menu items?
If so try this CSS:
.main-navigation .main-nav ul li[class*="current-menu-"] > a:hover { background-color: #000000; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know.
December 21, 2017 at 9:17 am #454671Bjoern Christian
Hello,
plkease take another look at the Problem: hover Color works on the entry page for the two menue items “Downloadbereich” and “Jobs”. But not for the Rest. If you are inside Jobs it works for the rest biut not for the two allready mentioned entries.
The difference: the menue items “Downloadbereich” and “Jobs” target to an external site or (“Jobs”) to a single page. The other menue items lead to an anchor within the large “one page design”…
December 21, 2017 at 9:19 am #454673Bjoern Christian
Another effect: if you click on the Impressum (bottom of the side) or on Datenschutz, highlighting works fine.
December 21, 2017 at 3:24 pm #454866Leo
StaffCustomer SupportDid you try my CSS? I’m not seeing it being added?
April 16, 2018 at 11:37 am #551938Rolandas
Hi
It works great on the main menu items, but not on sub-menu items.
I want to set a hover color for current sub-menu items too.
What CSS should be written for sub-menu?April 16, 2018 at 3:29 pm #552100Leo
StaffCustomer SupportHmm it should work for sub menu as well.
Can you link me to your page with the CSS added?
April 16, 2018 at 11:08 pm #552354Rolandas
April 17, 2018 at 8:43 am #552826Leo
StaffCustomer SupportTry this for the overall CSS:
.main-navigation .main-nav ul li[class*="current-menu-"] > a:hover .main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover { background-color: #b72029; color: #ffffff; }
April 17, 2018 at 8:54 am #552852Rolandas
I tried it. Then it does not work, either at the main or sub-menu.
April 17, 2018 at 9:04 am #552870Rolandas
Then somehow I tried with “! Important”.
And it worked..main-navigation .main-nav ul li[class*="current-menu-"] > a:hover { background-color: #b72029 !important; color: #ffffff !important; }
April 17, 2018 at 9:40 am #552908Leo
StaffCustomer SupportYeah it was probably getting over written.
Try this if you don’t want to use !important:
body .main-navigation .main-nav ul li[class*="current-menu-"] > a:hover, body .main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover { background-color: #b72029; color: #ffffff; }
April 17, 2018 at 10:16 am #552945Rolandas
Not work, either at the main or sub-menu.
-
AuthorPosts
- You must be logged in to reply to this topic.