-
AuthorPosts
-
September 23, 2014 at 9:08 pm #323910
I have a single front page with a nav menu pointing to different sections on the same page. Something is applying both a
.current_page_item
and a.current-menu-item
class to the first and fifth menu items, respectively. Enfold has the same style for both classes, so it’s showing the current page style on two different menu items.When I scroll down the page, the
.current_page_item
stays on the first menu item, and so does the ‘current’ style, while the.current-menu-item
moves to the next (sixth) menu item, along with the style again, but no further.Is there a way to have Enfold only apply one of the ‘current’ classes (
.current-menu-item
seems to be the only one that moves with scrolling, so that one), and maybe reset Enfold’s automatic application of.current-menu-item
so that it’s applied to the correct menu item from the start?September 24, 2014 at 7:02 pm #324533Hey dmoz!
You can add following code to Quick CSS in Enfold theme options under General Styling tab no to highlight home menu item
li#menu-item-5.current_page_item a { color: #8C8C8C; }
Best regards,
YigitSeptember 24, 2014 at 8:35 pm #324602Thanks for the reply, but that wasn’t my question. The menu items are already styled (see my original post above).
Anyone have an idea pertaining to the question?
- This reply was modified 10 years, 1 month ago by dmoz.
September 26, 2014 at 6:23 pm #325712I tried the solution from this post: https://kriesi.at/support/topic/current-menu-item-problem/ and it fixed the duplicate current-page highlight, but now the highlight doesn’t show accurately with where I am on the page. It highlights the section once I’m at the bottom of it, and skips one of the sections altogether. Any ideas?
September 30, 2014 at 4:39 am #326966Hi!
Sorry for the delay.
I’m not sure why it’s not working as it should. Can you please switch the advance layout builder to debug mode? Refer to this link: http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/
Copy the shortcode below then place it on pastebin.com. We would like to test it on our installation.
Cheers!
IsmaelSeptember 30, 2014 at 6:44 am #327021Hey Ismael,
Thanks for the reply. Here’s the pastebin with the shortcodes: http://pastebin.com/PCS2yVDW
Interested to know what you discover. Thanks!
October 2, 2014 at 8:52 am #328737Hey!
I tested the template on my install and copied your layout as close as possible. The current-menu-item is working as it should. Did you add any modifications on the child theme? Please post the login details here. We would like to check it. If possible, please update the theme to Enfold 3.0.
Best regards,
IsmaelOctober 2, 2014 at 5:27 pm #329109This reply has been marked as private.October 6, 2014 at 8:05 pm #331129Hey!
This code will help so that only one of the current menu item is highlighted:
.header_color .av-subnav-menu a:hover, .header_color .main_menu ul:first-child > li a:hover, .header_color .main_menu ul:first-child > li.current-menu-item > a, .header_color .main_menu > li.current_page_item > a, .header_color .main_menu ul:first-child > li.active-parent-item > a { color: #ffffff !important; } .header_color .av-subnav-menu a:hover, .header_color .main_menu ul:first-child > li a:hover, .header_color .main_menu ul:first-child > li.current-menu-item > a, .header_color .main_menu ul:first-child > li.current_page_item > a, .header_color .main_menu ul:first-child > li.active-parent-item > a { color: #8C8C8C; }
For the highlighting which is a bit off, you can check this post: https://kriesi.at/support/topic/anchor-link-causing-navigation-bar-to-highlight-the-wrong-link/
Regards,
Andy- This reply was modified 10 years, 1 month ago by Andy.
October 7, 2014 at 5:33 pm #331791Hi Andy,
That CSS worked, thanks.
The other post you sent to fix the inaccurate highlighting doesn’t actually come to a solution. Do you think there will be a fix for this soon?
October 9, 2014 at 11:46 pm #333494Hi,
Can you please create us an administrator account (tempadmin didn’t work)? post it here as a private reply.
Regards,
JosueOctober 10, 2014 at 6:10 pm #334000This reply has been marked as private.October 14, 2014 at 8:29 pm #335733Hey!
I am afraid I am pretty sure that the wrong scrolling offset is caused by one of the modifications made. Unfortunately there are quite a few and I didnt want to mess around with the site but I guess anything that modifies either the height of a header element or changes the top padding of header or main container might cause this.
If you can somehow filter if and which of the css modifications causes this I might be able to come up with a solution :)
Cheers!
KriesiOctober 14, 2014 at 9:26 pm #335752Hey Kriesi,
Thanks for looking into it!
If I get rid of my custom spacing/padding/margins, how would I go about achieving the layout that I have and have everything work correctly?
October 14, 2014 at 9:41 pm #335761Hi!
Truth to be told, I would prefer it anyway to make the theme flexible enough so you can use all your custom css. But since I dont know which property is causing the problem I dont know where to start fixing :)
So if you can find out which customization is causing the issue I can try to add some modifications to the theme that allows our customers to use a modification like that.
In the end all I need you to do is remove the customizations step by step until we know which one is causing this. After we know that feel free to re apply all customizations and I will try to come up with a solution ;)
Regards,
KriesiOctober 14, 2014 at 9:47 pm #335765I removed all custom css that was affecting the header, nav, content padding, etc, but the highlighting is still off. It starts okay at the first section, but gets successively worse with each one.
Ideally, I wouldn’t need to add any custom css and would be able to modify the spacing on all elements (including the menu within the header). Enfold allows me to change the header height, but not where the menu sits within it (ie. it’s always right at the bottom no matter the header height).
- This reply was modified 10 years, 1 month ago by dmoz.
October 14, 2014 at 9:59 pm #335770Hi!
Ok this is weird. is it also happening when you remove completely remove the custom css?
Regards,
KriesiOctober 14, 2014 at 10:09 pm #335776I removed any custom css that affected the header, nav, or main content area with top or bottom padding or margin.
The only custom css that is still in there is only affecting colors, etc. I tried removing all custom css as well, but the scrolling is still off. Check the page now (without any custom css) and you’ll see what I mean: http://ianrigby.com
October 15, 2014 at 9:41 pm #336400Hi!
Took some work but I think I found the issue after importing your whole demo to a local installation and doing some trial and error tests. Seems the latest update of the portfolio sorting script was not working as intended. We will fix that with the next update which should arrive during the next few days ;)
Regards,
KriesiOctober 15, 2014 at 10:51 pm #336427Awesome, you guys are great! I really appreciate your time and support with this. Keep up the great work!
I look forward to the update, and will report back either way if the issue is resolved or not.
- This reply was modified 10 years, 1 month ago by dmoz.
October 16, 2014 at 2:28 pm #336758October 18, 2014 at 12:56 am #337556Are updates usually posted first on your website or on codecanyon? Or via the theme update on the options page? Haven’t seen anything yet.
October 19, 2014 at 4:10 am #337807Hi!
Yes, you will be notified on the theme updates panel once a new patch is available. Usually takes a few hours, If possible, try logging in and out. You can also check Enfold’s change log or overview page on themeforest. Another user reported the same issue, it seems like the layer slider is causing the issue: https://kriesi.at/support/topic/main-menu-in-page-navigation-selected-item-not-working-properly/
Regards,
Ismael -
AuthorPosts
- The topic ‘Single page nav menu multiple items highlighted .current-menu-item’ is closed to new replies.