ColleenRose Posted May 14, 2020 Share Posted May 14, 2020 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 Link to comment
8B39C8 Posted May 14, 2020 Share Posted May 14, 2020 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; } Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.