Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] How change a:active color in left sidebar (http://forum.bytesforall.com/showthread.php?t=11698)

c12281 Dec 12, 2010 10:27 PM

[SOLVED] How change a:active color in left sidebar
 
Found another thread with a solution that works ALMOST perfectly for changing active link color in the left sidebar.

td#left li.current_page_item a {
color: #99cc33 !important;
}

The only problem is that when I click on "Internet Marketing," (http://muzzmarketing.com/services) the entire list of second level links turn active instead of just "Internet Marketing"

Any suggestions? Thanks!

juggledad Dec 13, 2010 04:03 AM

If you just want it to effect one link, then you need to look at the source of the page, find the widget and see if there is an ID or CLASS's that will uniquely identify the link, then use them in your CSS selector.

c12281 Dec 13, 2010 07:50 AM

Maybe I wasn't clear enough. Please look at the URL and you will see exactly what I mean http://muzzmarketing.com/services. All is working fine except for the primary link that has secondary links beneath it. Thanks.

juggledad Dec 13, 2010 08:07 AM

CSS cascading style sheet - what you apply to an element cascades down to it's children.

If you want the children to have a different effect, you have to code CSS to shut off the settings that were set for the parent.

In your case your selector is 'td#left li.current_page_item a' which in english says:
1) find the table cell with an ID of 'left'
2) find a <li> under it that has a class of 'current_page_item'
3) find ALL <a>'s under it and apply these rules to them

since you have a <ul> under the <li> that has more <li> adn <a>'s the rulls apply to the loer elements. You need to shut them off with something like

HTML Code:

td#left li.current_page_item ul li a {
color: #ffffff !important;
}


c12281 Dec 13, 2010 08:14 AM

Works!!

Thank you so much!


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

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