I'm trying to make a laser tag game to share with my friends. And I want them to be able to choose an avatar for the game. I want it to be like a silhouette of the avatar, that changes into the actual avatar when you hover. However, the CSS background: url property doesn't work. Instead, nothing loads. When I right-click and select the 'Inspect' option, it says that there are 2 errors (one for each avatar) saying that the path is wrong even though I have checked and checked again. Why?
body{
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: black;
}
.avatars{
justify-content: center;
margin-left: 20%;
}
.female-av{
background: url("//img/female-avatar-silhouette.png") no-repeat;
}
.male-av{
background: url('//img/male-avatar-silhouette.png') no-repeat;
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Choose Your Character</title>
<link rel="stylesheet" href="css/avatar-page.css">
</head>
<body>
<div class="avatars">
<div class="female-av"></div>
<div class="male-av"></div>
</div>
</body>
</html>
Any help is greatly appreciated!