Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

[SOLVED] How to highlight menu list items


  #1  
Old Dec 20, 2014, 12:28 PM
RHCdG
 
170 posts · Nov 2009
Netherlands
Hello all,

I managed to find how to highlight menu list items on hover, (under ATO>Style Widgets>Widget List Items>Link Text Hover Color) but I would like to highlight the menu list item that the user clicks so that the active list item remains highlighted in the menu while the user is on the respective page. Is there a way to do that, please?

Many thanks,
Rutger
  #2  
Old Dec 20, 2014, 05:55 PM
Jam's Avatar
Jam
 
1,112 posts · Mar 2011
Perth, Western Australia
I dont use ATA anymore, but you need to look for or add 'current-page' attribute. I will try and find an example code, brb.

These are two examples of code from Themeframe built sites (same developer, often same code), that will give the current page (or list item) specific attributes. Use a code inspector to find what you have or try adding the following (with your CSS) to see the results. Play time

Code:
.widget ul li.current_page_item {
}
Actually, further digging, on another site its this code
Code:
.widget ul li a:hover, .widget ul li.current_page_item a, .widget ul li.current-cat a
Its fun to play and learn, good luck.
__________________
May the learning curve never plateau... Thanks Larry for teaching me heaps.
My Themeframe built sites

Last edited by Jam; Dec 20, 2014 at 06:15 PM.
  #3  
Old Dec 21, 2014, 01:28 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
Thanks, Jam! I appreciate, and agree with the fun of learning and playing.
I am not clear, however, on where I would put the second snippet you gave me.
Also, does it state that the highlighting should be e.g. red?
  #4  
Old Dec 21, 2014, 10:51 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Jam gave you the css selector, you need to add the css rule you want and then put it all in the CSS inserts option
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Dec 22, 2014, 05:39 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
Thanks JD,

This is now in ATO>CSS Inserts:

Code:
.widget ul li a:hover {
font-color: #E51616;
}

.widget ul li.current_page_item a {
font-color: #E51616;
}

.widget ul li.current-cat a {
font-color: #E51616;
}
... but it does not work
  #6  
Old Dec 22, 2014, 05:56 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
font-color is not a valid CSS rule. It should be just color
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #7  
Old Dec 22, 2014, 06:00 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
Thanks, Miles, but still no result. Would you guys care to take a look, perhaps?
  #8  
Old Dec 22, 2014, 06:12 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I just used a code inspector (Firebug) and saw that the selector is current-menu-item not current_page_item so the rule would be
HTML Code:
.current-menu-item a {
    color: red !important;
}
I left out the other part of what you had as it is not needed and added !important as there is apparently some other code that this needs to override.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #9  
Old Dec 22, 2014, 06:57 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
That actually works, Miles
Thanks, all!

Bookmarks

Tags
highlight, menu list items



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] i need div or class name for menu 2 list items? mtouchette Header configuration & styling 2 May 14, 2012 02:45 PM
Adding list items to the Page Menu bseppa Page & Category Menu Bars 10 May 4, 2010 02:37 PM
CSS for Widget list items not working (bullets) mlamkin Sidebars & Widgets 2 Aug 31, 2009 02:46 PM
How to change the spacing of list items Webmason Atahualpa 3 Wordpress theme 5 Aug 4, 2009 03:33 PM


All times are GMT -6. The time now is 02:10 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.