I have taken on the challenge of creating a Netflix Clone as a personal project.
In my version, I want the border around the image and the user's name to both highlight when hovered over in the Netflix Profiles section.
However, despite trying for over an hour, I can't seem to make the border and text change together. I know I must be missing something simple and probably just overthinking it. Should I approach this with a JavaScript function or adjust the CSS? (I struggle with adding JS to my projects, which is why I am attempting this clone!)
Any tips or hints would be greatly appreciated as I continue to troubleshoot.
body, html {
height: 100%;
margin: 0px;
margin-top: -11px;
margin-left: 22.5px;
padding: 0px;
color: white;
font-family: 'Roboto', sans-serif;
background-color: rgb(17, 17, 17);
}
.container {
text-align: center;
position: relative;
top: 10%;
}
/*
----------------
PROFILES SECTION
----------------
*/
.profiles {
margin: 20px;
padding: 20px;
display: flex;
justify-content: center;
}
.prfImg {
margin: -6px;
padding: 12px;
}
.prfImg > img {
margin: 2px;
padding: 2px;
border: 0.5px solid rgba(255, 255, 255, 0.061);
border-radius: 3px;
}
.prfImg > img:hover {
color: rgba(255, 255, 255, 0.787);
border: 3px solid rgba(255, 255, 255, 0.787);
border-radius: 3px;
}
#user {
font-size: 25px;
color: grey;
}
/*
----------------
BUTTON
----------------
*/
.btn {
margin: 30px;
padding: 30px;
text-align: center;
}
button {
margin-top: 30px;
font-size: 22px;
color: grey;
padding: 10px;
background-color: transparent;
border: 1.5px solid grey;
}
button:hover {
color: rgba(255, 255, 255, 0.863);
border: 1.5px solid rgba(255, 255, 255, 0.863);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="profiles.css">
<!-- google font -->
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap" rel="stylesheet">
<title>NETFLIX - Profiles</title>
</head>
<body>
<header>
<img src="Img_d.profiles/netflix_logo.png" alt="netflix logo TM" width="99.2px">
</header>
<div class="container">
<div class="header-text">
<h1 style="font-size: 50px;">Who's watching?</h1>
</div>
<div class="profiles">
<div class="prfImg">
<img src="Img_d.profiles/profile_one.png" alt="Profile One" width="75%" label="hello">
<p class="prfImg" id="user">A name</p>
</div>
<div class="prfImg">
<img src="Img_d.profiles/profile_two.png" alt="Profile Two" width="75%">
<p class="prfImg" id="user">A name</p>
</div>
<div class="prfImg">
<img src="Img_d.profiles/profile_three.png" alt="Profile Three" width="75%">
<p class="prfImg" id="user">A name</p>
</div>
<div class="prfImg">
<img src="Img_d.profiles/profile_four.png" alt="Profile Foud" width="75%">
<p class="prfImg" id="user">A name</p>
</div>
</div>
<!-- button class -->
</div>
<div class="btn">
<button>Manage Profiles</button>
</div>
</body>
</html>
by myself!*