Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the link color in a specific class for a div CSS

In my Page the following CSS is set:

a:link {     color: #0094DE;     text-decoration: none;   } a:visited {         text-decoration: none; color: #0094DE;  } a:hover { text-decoration: underline; color: #DD127B;  } 

I want to Change the Link color inside a div which has a class assigned to it. I tried the following :

register:link{color:#FFFFFF;         } 

Where register is the name of the div in which i want to change the link color. How can i do that? Also how to change the color for hover link over the same div?

like image 864
Anil Jain Avatar asked Jun 01 '12 06:06

Anil Jain


People also ask

How do I change the color of a link in a div in CSS?

You've probably noticed links changing color when you place your cursor on them, a stylish effect and one that's very easy to implement using CSS. To change the color of your link on hover, use the :hover pseudo property on the link's class and give it a different color.

How do I change the color of a selected link in CSS?

To change the link color, we have to use the color property of CSS. The name of the color can be given in any valid format, such as the color name, rgb() value, or HEX value.

How do I specify a link in CSS?

The :link selector is used to select unvisited links. Note: The :link selector does not style links you have already visited. Tip: Use the :visited selector to style links to visited pages, the :hover selector to style links when you mouse over them, and the :active selector to style links when you click on them.


1 Answers

.register a:link{     color:#FFFFFF; } 
like image 65
Shehzad Bilal Avatar answered Oct 07 '22 22:10

Shehzad Bilal