Site logo

Archived topic

active link color

3 replies · Started by johnaps on April 12, 2020

Viewing posts 1–4 of 4

Hello! I am trying to figure out how to make a link on my table of contents widget (on the left sidebar), to become black when i click it and stay that way when i am on corresponding section of the link...
I tried the pseudo-class (active) on the link of that element's class but didnt stick..
Is what i am asking for, a css thing? Or maybe javascript?

Thank you in advance for any input!

Hi there,

Typically, you would do this:

#left-sidebar.sidebar .widget .lwptoc_item a:active, 
#left-sidebar.sidebar .widget .lwptoc_item a:focus {
    color: black;
}

However, something seems to be removing focus once the anchor reaches its destination. It's likely something built into the TOC javascript, unfortunately.

Thank you Tom! Will check it out!

No problem :)

This archived topic is closed to new replies.