7/8 Sorting Your Friends


#1



Replace this line with your code.


#2

Hello this my Html code

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>My Social Network</title>
	</head>
	<body>
		<div class="friend" id="best_friend" style="border: 2px dashed #008000;"> <p> </p></div>
		<div class="family" style="border: 2px dashed #0000FF;"><p> </p> </div>
		<div class="enemy" id="archnemesis" style="border: 2px dashed #FF0000;"> <p> </p> </div>
		
	</body>
</html>

and this is my css code

div {
	display: inline-block;
	margin-left: 5px;
	height: 100px;
	width: 100px;
	border-radius: 100%;
	border: 2px solid black;
}
#best_friend {
    border: 4px solid #00C957;    
}

#archnemesis {
    border: 4px solid #CC0000;
}

But for some reason when i press submit it says: Oops, try again. Did you remember to give your #best_friend a border of color #00C957?

Could anyone please help me as i cannot understand what is wrong with my css??


#3

you use the style attribute here:

<div class="friend" id="best_friend" style="border: 2px dashed #008000;">

the style attribute will overwrite your css code:

#best_friend {
    border: 4px solid #00C957;    
}

remove the style attribute, it isn't needed


#4

Thank you very much. :slight_smile: