Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2017-03-19 02:12:51

PhilippeH
Member
From: Paris, France
Registered: 2014-04-11
Posts: 167

Underline the menu item on the current page

I followed the tutorial given by Rod to underline the menu item of the current page. On the other hand I do not know how to make the underscore of the current page also in the drop-down menu?

http://phoneographie.com

Philippe

Last edited by PhilippeH (2017-03-19 02:16:12)

Offline

#2 2017-03-19 02:29:45

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Underline the menu item on the current page

The script highlights the appropriate submenu items on my test site


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2017-03-19 02:35:08

PhilippeH
Member
From: Paris, France
Registered: 2014-04-11
Posts: 167

Re: Underline the menu item on the current page

Yes Rod, I had noticed that it worked on your sites.
But unfortunately this does not work on my two sites!
So I thought there might be a little trick.

Offline

#4 2017-03-19 02:44:39

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Underline the menu item on the current page

Are all your page templates using the same phplugins file?
I don't remember which version of the script I'm using (away from my PC right now). Have you seen Ben's version?
http://community.theturninggate.net/vie … hp?id=7246


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2017-03-19 02:56:22

PhilippeH
Member
From: Paris, France
Registered: 2014-04-11
Posts: 167

Re: Underline the menu item on the current page

I looked at the source code of one of the pages on your site and at first glance it's the same. I use Ben's script!

I use the same phplugins file for all my page templates.

The only difference is that on my sites it is the text that changes color.

Offline

#6 2017-03-19 03:16:11

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Underline the menu item on the current page

You may need to use more specific CSS then, something that will catch the submenu items.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2017-03-19 03:52:48

PhilippeH
Member
From: Paris, France
Registered: 2014-04-11
Posts: 167

Re: Underline the menu item on the current page

Thank you for your reply, but that I think I do not know

Offline

#8 2017-03-19 04:06:25

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Underline the menu item on the current page

You'll need to add a CSS rule that will target the sub menus. Apparently it's different than for the main nav menu items.
I'll take a look at it later today or tomorrow once I can get to my PC and use the browser inspector to probe the selectors.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2017-03-19 04:40:21

PhilippeH
Member
From: Paris, France
Registered: 2014-04-11
Posts: 167

Re: Underline the menu item on the current page

Thank you Rod, it's nice but there is no urgency !

Philippe

Last edited by PhilippeH (2017-03-19 05:44:08)

Offline

#10 2017-03-19 06:59:53

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Underline the menu item on the current page

yep, the selector needed to be more specific. Try adding this rule to cover the submenu items:

ul.sub-menu li a.selected {
   color: white !important;
}

if you need the text underlined like you mentioned above, add:
text-decoration: underline; to the above rule.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#11 2017-03-19 20:55:14

PhilippeH
Member
From: Paris, France
Registered: 2014-04-11
Posts: 167

Re: Underline the menu item on the current page

Thanks Rod, that's what I put and it works great.

ul.sub-menu li a.selected, .selected {
   color: white !important;
}

Philippe

Offline

Board footer

Powered by FluxBB