3 replies [Last post]
dwtbc
dwtbc's picture
Offline
newbie
Last seen: 6 years 47 weeks ago
Timezone: GMT+1
Joined: 2012-12-18
Posts: 2
Points: 3

I would like to know if it's possible to highlight the parent page with a different color when a child page is chosen?

I would like it to be like this example: www.coachingcreative.dk

Daniel

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 44 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Not a great example to choose

Not a great example to choose considering it's not a WP site and uses amongst a lot of copy paste scripts/styles some form of javascript module to manage the drop downs that does things in a really bad fashion by adding inline styling.

Yes you can do what you want but what approach is chosen is another matter and dependent on how your site functions not someone else's as it were.

The WP wp_nav_menu() function provided for users to manage their site links in the dashboard places a series of tokens / classes on link elements depending on what they are or what state there are in 'selected', 'current' type of link post/page etc, it's sufficient that you can then style whatever you care to in your main stylesheets.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

dwtbc
dwtbc's picture
Offline
newbie
Last seen: 6 years 47 weeks ago
Timezone: GMT+1
Joined: 2012-12-18
Posts: 2
Points: 3

I solved it my self

The issue is solved.

Don't know how to close this?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 44 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

It's common practise to share

It's common practise to share a little of what you did in case others happen by and read the thread, did you just style the WP classes provided on menus links?

I'll mark the post as resolved, they're not closed as such.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me