Jump to content

Change color of links ONLY when hovered over

Recommended Posts

I'm looking to make all the links on my page magenta, but ONLY when being hovered over. I have them designed per section so I dont want them to be uniformly one color, but i want them to all have the same color when being hovered over. Every custom css ive found makes all of the links that color even when not being hovered over.

my color is 

#C71585

C71585
Edited by ColleenRose
Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Generally thats achieved by using the :hover tag in CSS.

Making all links a certain color, except for the ones that got their CSS changed later down the line, would thus be achieved by using the code snippet below.

 

a:hover {
  color: #C71585;
}

 

Personally I think it's always a good Idea to apply the same rules to :focus as to :hover. In this case the links would also change color, when focusing on them using TAB on a computer keyboard.

a:hover, a:focus{
  color: #C71585;
}

 

Edited by 8B39C8
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.