It shows right but with wrong message came out


#1

https://www.codecademy.com/en/courses/web-beginner-en-WF0CF/3/5?curriculum_id=50579fb998b470000202dc8b

It prints really well on screen, but the message shows"Oops, try again. Did you remember to set your first to the color #CDBE70?"


<body>
	<div><a href="www.baidu.com">baidu</a></div>
	<div><a href="www.douban.com"> douban</a></div>
	<div><a href="www.sina.com"> weibo</a></div>	
</body>



a:hover{
    text-decoration:none;
    }
    
div:first-child a{
    color:#cdbe70;
  }
 
div:nth-child(3) a{
    color:#ffc125;
}



#2

you need a:first-child, the exercise sort of assumes you put the links directly inside body.

I understand your logic, but the exercise doesn't like it


#3

Thanks. I tried a:first-child, the message shows right, but on screen, it seems to be wrong. :slight_smile:


#4

yea, because you can't have both. like i explained, the exercise doesn't expect you to use divs. Just pass it, you know how to make the output right


#5

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