Why all link not get colored


#1

something wrong happen whole editor become same color

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>Result</title>
	</head>
	<body>
		<!--Add your HTML below!-->
		
		<p><a href="http://www.codecademy.com/">Codecademy Home</a></p>
		<p><a href="http://www.codecademy.com/learn">Learn</a></p>
		<p><a href="http://www.codecademy.com/create/creator">Teach</a></p>
		
	</body>
</html>


.css
a:first-child{
    color:#CDBE70;
}
a:nth-child(3){
    color: #FFC125;
}
a:hover{
    text-decoration:none;
    color:green;
    font-size:25px;
}


#2

Since the anchor tags are all children of their own parent, they are all first-child. There is no a:nth-child(3).

p:first-child a {

}
p:nth-child(3) a {

}

Aside: Jumpiness on a web page pretty much always results in the same thing... Quick exit from page (and site). Changing font size on mouse over is unsettling for most users. Something to keep in mind.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.