Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
CSS Menu Hover Technique
Old 07-18-2010, 03:56 AM CSS Menu Hover Technique
evans123's Avatar
Ultra Talker

Posts: 468
Trades: 0
I use the following code in my wordpress blog, when i hover over the <li>'s in the children i can get them to change color etc. However i would like it if the current_page_parent also changed color at the same time. Is this possible and is there a CSS selector that would allow me to do this?

HTML Code:
<div class="menu">
<ul>
<li><a title="Home" href="http://www.benwebdeveloper.com/**/">Home</a></li>
<li class="page_item page-item-2 current_page_ancestor current_page_parent"><a title="About" href="http://www.benwebdeveloper.com/**/?page_id=2">About</a>

<ul class="children">
<li class="page_item page-item-4 current_page_item">
<a title="Sub Menu 1" href="http://www.benwebdeveloper.com/**/?page_id=4">Sub Menu 1</a></li>
</ul>
</li>
</ul>
</div>

Last edited by evans123; 07-18-2010 at 03:57 AM..
evans123 is offline
Reply With Quote
View Public Profile Visit evans123's homepage!
 
 
Register now for full access!
Old 07-18-2010, 01:48 PM Re: CSS Menu Hover Technique
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
i would like it if the current_page_parent also changed color at the same time.
You're going to need javascript for that, it cannot be done with CSS alone.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-19-2010, 01:20 PM Re: CSS Menu Hover Technique
Registered User

Posts: 86
Name: John Dacu
Trades: 0
or you could add a class to current item from server-side like: active or something
johnny.dacu is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS Menu Hover Technique
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.07392 seconds with 12 queries