Change the color of link in `current` state

Hi there

I have been trying to change the color of a link when it is visited in my navbar. I want it stay black when I click on in. I tried setting the desired color in the visited state, focused stated and current state but it’s still not working.

Any pointers will be much appreciated.
Thanks in advance.

hi @Khanya to get help you should share read only link

If you miss how to do that is not only pinned on top of this forum but also on request it self. To save you time here is link.

https://preview.webflow.com/preview/celestia-skin-792206?utm_medium=preview_link&utm_source=designer&utm_content=celestia-skin-792206&preview=a8b02f2f9f4a7fd43fcabdfb2af0f696&workflow=preview

1 Like

HI @Khanya state you are looking for is not visited but you need to change color of current state.
than you change font color. Be aware that color is showing as black while is blue (it is known wf glitch) . Another way how to do that is with custom css to set color on w--current .

<style>
.w-nav-link.w--current{
	color: black;
}
</style>

here is a short video how to in case you need more detailed explanation
Note: I have in video wrote incomplete selectors correct way to select element is .w-nav-link.w--current as in code example

4 Likes

That worked like a charm, Thank you so much for your help.

1 Like

hi @Khanya I’m glad that worked for you, if you don’t need further assistance with this issue feel free to close your request as solved :wink:

The problem has been solved thanks but do you mind if I could ask just one more thing?

If it is related to your request why not. :wink:

Lol not really, it’s related to positioning an element, it should be quick.

Hi @Khanya to keep this request clean of non related questions you can send me PM to ask me what you would like to know or set new request if you didn’t find solution on forum. In meantime free free to close this request as solved.

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