Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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, 11:28 AM
RHCdG
 
162 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, 04: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 05:15 PM.
  #3  
Old Dec 21, 2014, 12:28 AM
RHCdG
 
162 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, 09:51 AM
juggledad's Avatar
juggledad
 
23,672 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, 04:39 AM
RHCdG
 
162 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, 04:56 AM
lmilesw's Avatar
lmilesw
 
10,174 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, 05:00 AM
RHCdG
 
162 posts · Nov 2009
Netherlands
Thanks, Miles, but still no result. Would you guys care to take a look, perhaps?
  #8  
Old Dec 22, 2014, 05:12 AM
lmilesw's Avatar
lmilesw
 
10,174 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, 05:57 AM
RHCdG
 
162 posts · Nov 2009
Netherlands
That actually works, Miles
Thanks, all!

Bookmarks

Tags
highlight, menu list items

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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 01:45 PM
Adding list items to the Page Menu bseppa Page & Category Menu Bars 10 May 4, 2010 01:37 PM
CSS for Widget list items not working (bullets) mlamkin Sidebars & Widgets 2 Aug 31, 2009 01:46 PM
How to change the spacing of list items Webmason Atahualpa 3 Wordpress theme 5 Aug 4, 2009 02:33 PM


All times are GMT -6. The time now is 04:08 PM.


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