How to get to "current" state of dropdown toggle?

Hi,

How do I get to the “current” state of the dropdown toggle…I want to have main dropdown text link show an active state when one of its menu link pages is being used. This may or may not get me there.

Thoughts?

Best,

Nathan

http://a-living-theory.webflow.io

https://preview.webflow.com/preview/a-living-theory?preview=a94ce00d956e347412f774b183f9f4e7


Here is my public share link: LINK
(how to access public share link)

Hi @nathanphilsteele great question! You cannot actually set the current state of a dropdown toggle unless you have a text link in your dropdown and you’re on the page it is linked to.

When you navigate to a sub-page which you link to from a dropdown link in your dropdown:

You could try detaching your navigation symbol for those certain pages and giving your dropdown a combo class to style it.

I think it may take a minute to figure out exactly what you are talking about…so it may take me a minute for an official reply.

Thanks @Waldo

Nathan

Hi @Waldo,

It appears I don’t quite exactly get what you are saying…can you maybe go into a little more detail?

Best and thank you in advance,

Nathan

Hi Nathan

Samliew helped me with this some time ago. Perhaps this will solve your problem?

Would be very useful if this was an “settings option” in Webflow, not custom code!

1 Like

Sorry @IggsTP, think I flagged your post by mistake!

What was your original post @IggsTP?

Best,

Nathan

Agreed on the settings option for sure! @Christoffer

It appears the initial design that the code was created for has changed since the original posting…I’m have a hard time paring out where to put what element. For instance, “.w-” the name of one of your elements?

Best,

Nathan

Hi @samliew,

I tried the solution mentioned in here: Current class on on the actual dropdown toggle button in navbar? - #4 by Christoffer and replaced dropdown-active with nav-menu-text-dropdown-sub but the behavior I got was that arrow overlapped the text and no color change…thoughts?

Best,

Nathan

You styled it to have no padding, so the arrow does not have anywhere to go.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.