I want to style the “current” state of the dropdown parent link in the navbar when I’m on the subpage of the dropdown toggle. I’ve read all the posts on this topic and tried to follow embedding the javascript codes written by @samliew (Current class on on the actual dropdown toggle button in navbar?) but couldn’t make it work.
I would really appreciate if anyone can solve this issue
@pnewest,
Thanks for your reply. As I understand it, there is no current state in drop-down toggle? in that case will .w-current{color: #9c0000;} work?
w-dropdown-link.w–current is set in webflow.css and referred in webflow.js so doesn’t look like it could be changed within Webflow UI. We export our sites and add an extra css file so can override some default CSS (hence my CSS). We had to change the current state as the Webflow default does not meet WCAG 2.1 AA colour contrast and, as all Public Body sites in the UK have to meet this accessibility level, and all our sites are Public Body, we have to meet this.
If you do not export code, so have not control over the style sheet files, you could add to the Custom Code for page inside the tag for the page, or for the whole site use Site > Settings > Custom code :