- This topic has 15 replies, 3 voices, and was last updated 7 years, 4 months ago by
Tom.
-
AuthorPosts
-
October 11, 2017 at 3:34 am #401203
Roy
Hi,
I build a one-page website with anchor links in the menu.
I want to create a seperate page (about us), and I want that the links in the menu will lead to the specific part in the homepage (with the anchor links).
So, I created the anchor links with “/he/” that will lead to the home in Hebrew.
The anchor Links in the menuNow, The Links is ok from the about page, but, in the home page, all the links are highlighted as “current”
All Links are “Current” – Image exampleThe color setting in the customizer – image
What is your advise for solving this issue? create a unique menu for the home page? or there is an option (not changing the colors..) to prevent all the links to be highlighted?
October 11, 2017 at 9:11 am #401391Leo
StaffCustomer SupportHi there,
Any chance you can link me to the site?
October 12, 2017 at 5:02 am #401841Roy
this is the home page:
https://in3d-tech.comthis is the about page:
https://in3d-tech.com/aboutI removed the prefix of the whole address before the anchor link, because this is a live website and I couldn’t leave it with the bug of all links are highlighted.
before this erase all the “anchor” links was like: “https://in3d-tech.com/#3d” and now it’s like “#3d” – so if you in the about page click on the menu won’t lead to anywhere
October 12, 2017 at 9:13 am #402050Leo
StaffCustomer SupportSo you are wanting the current navigation background to stay the same color on home page?
If so give this CSS a shot:
.home .main-navigation .main-nav ul li[class*="current-menu-"] > a { color: #3f3f3f; background-color: rgba(248,249,250,0.8); }
Adding CSS: https://docs.generatepress.com/article/adding-css/
October 16, 2017 at 11:24 am #404338Roy
Thanks, but not perfect.
Now, the two links on the right (was the test links – with /he/ before the #) don’t show color on hover.Example video:
https://streamable.com/lddsbOctober 16, 2017 at 1:51 pm #404447Leo
StaffCustomer SupportSeems to work for me? http://www.screencast.com/t/1xYbVQBogY
Have you fixed it?
October 17, 2017 at 5:14 am #404807Roy
No.
I cancelled the test links. this is live site with customers.
If you need to watch the “bug” in action I can back to these setting.October 17, 2017 at 8:55 am #404998Leo
StaffCustomer SupportWhat’s different between the test links and actual links?
October 17, 2017 at 9:18 am #405027Roy
the test links was with “/he/” before the “#”. as example: /he/#about
Because there is “/he/” before the anchor link “#about”, when you was at https://in3d-tech.com/he those links considered as current.
you solved the issue of the current background color. now we need to make them hover background color..
October 17, 2017 at 10:46 am #405090Leo
StaffCustomer SupportAny chance you can show the problem on the live site? Hard for me to tell this way.
October 17, 2017 at 2:34 pm #405187Roy
Yes.
Look at the 2 links next to the logo.the homepage:
https://in3d-tech.com/heAbout page:
https://in3d-tech.com/he/about-us/as you can see, only these links will lead to home page from the about page. but, these links are designed as current in the homepage
October 17, 2017 at 5:37 pm #405283Leo
StaffCustomer SupportHuh…is the CSS still added here?
https://generatepress.com/forums/topic/all-menu-link-highlighted-one-page-site/#post-402050It should’ve changed those two.
If not can you try this?
.rtl.home .main-navigation .main-nav ul li[class*="current-menu-"] > a { color: #3f3f3f; background-color: rgba(248,249,250,0.8); }
October 17, 2017 at 10:57 pm #405354Roy
Now you can see the site with this css..
The issue, as I told before, is that the two links on the right don’t show color on hover.Example video:
https://streamable.com/lddsbOctober 17, 2017 at 11:29 pm #405373Tom
Lead DeveloperLead DeveloperYou can adjust the color on hover as well:
.rtl.home .main-navigation .main-nav ul li[class*="current-menu-"] > a:hover { color: #3f3f3f; background-color: rgba(248,249,250,0.8); }
October 19, 2017 at 7:10 am #406252Roy
Thanks! I used this code:
.rtl.home .main-navigation .main-nav ul li[class*="current-menu-"] > a { color: #3f3f3f; background-color: rgba(248,249,250,0.8); } .rtl.home .main-navigation .main-nav ul li[class*="current-menu-"] > a:hover { color: #ffffff; background-color: #760213; }
Very close for solution…only one thing to fix…
There is different background color for the menu items when scroll down
example images:
Same color menu – top of the page
-
AuthorPosts
- You must be logged in to reply to this topic.