Jump to content

Changing ALL hyperlinks to a different color (7.1)

Recommended Posts

Add to Design > Custom CSS

#page a {
    background-image: linear-gradient(to right,currentColor 100%,currentColor 0);
    color: red;
}
#page a:hover {
    background-image: linear-gradient(to right,currentColor 100%,currentColor 0);
    color: green;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 7 months later...
On 9/7/2021 at 3:59 AM, ABA said:

Hello @Lecreesma and @ajbajb  - may I ask how you managed to resolve the issue without code? I"m having some trouble and the code provided by user:ajbajb has resulted in the same 'blocking out' issue you encountered

Can you share link to your site? We can take a look

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 6 months later...
On 4/9/2022 at 9:13 AM, MLS108 said:

Thanks for this! I'm curious about how to edit this a little bit more. 

 Is it possible to make a link underlined in a color and then on hover make it solid ... like here:

https://www.nationalgeographic.com/history/history-magazine/article/angkor-wat-the-worlds-biggest-religious-complex-served-two-faiths

Possible. Can you share link to page where you use link? We can tweak the code for your site easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 4/11/2022 at 8:31 AM, MLS108 said:

Yes of course!

Here is an example page: https://onion-snail-wjhl.squarespace.com/artist-landing-page-template

I'd love this type of hover link to only happen in the body of the webpage. Not in the menu section. 

Thank you as always! Your help is appreciated beyond words.

Add to Artist Page Header

<style>
  p a {
    position: relative;
    z-index: 0;
}
p a:after {
    content: "";
    background-color: yellow;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 5px;
    z-index: -1;
    left: 0;
}
p a:hover:after {
    height: 15px;
}

</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 4 months later...

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.