Jump to content

Text links not all correct colour

Go to solution Solved by joseph81,

Recommended Posts

Hiya,

I've set my header links and text links to be red on this theme in Site Styles yet only some of them are correctly showing as red. Does anyone know why?

https://www.whyyoucreate.com/contact password: cr3ate

PS: the 'book a pr chat' link is H1 tag for SEO reasons, but as said above, the header links are set to be red so it should work, and in any case, the ordinary text link '@whyyoucreate' is also not working.

Thanks so much to anyone that can help.

Link to comment

You have 2 problems. A specificity issue  is the first problem(you have an important on the pr  button color) and the second is you target only the main navigation(using the wrapper class). Solution: Use !important to override the other !important on the book a pr chat link and also remove the wrapper class and add the #header id for bigger specificity:

#header :not(.header--menu-open) a {
    color: var(--navigationLinkColor)!important;
}

 

Edited by joseph81

Jozsef Kerekes - Front-end developer and Squarespace enthusiast
My Blog: https://ui-workarounds.com
If you like my answer, please give me an upvote/like. Highly appreciated.

 

 

Link to comment

Thanks so much for your quick reply! 

I'm a bit of a beginner so not 100% sure I follow everything you've said, but to check in case of clarity, it's these links that are not going red for me: the first and third bullet point. I'm only trying to get them to go red automatically using the 'Site Styles' area, not custom css. (I think perhaps you are referring to my header button... as I had just tried changing that as want it lilac only on the homepage but then realised of course it changes it on every page so might just leave that to change with the theme...unless you know how I can get use custom css to have it a custom colour only on the homepage?)

image.png.c2e3dc0b1d08d7b9d6db796d4a1b54cc.png

Link to comment
  • Solution

Situation changes in this case. I believe you applied a text color first on a text and then applied the link on a part of the text:

1.  image.png.dab3bc7ef347d8ac4e9f029425bd1853.png

2. image.png.08439a397610ef087779380c4ed163e0.png

3. 

image.png.bc7bc87fe59852bbaae61cdf1c7d2633.png

The color on the span is applied on the text instead of the color of the link that is the parent element of the span as you can observe on the left.

 

To solve this, you should add a text then the link and finally the color on the rest of the text that is not link(the blue in your case)

Jozsef Kerekes - Front-end developer and Squarespace enthusiast
My Blog: https://ui-workarounds.com
If you like my answer, please give me an upvote/like. Highly appreciated.

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.