<!DOCTYPE html>
<html>
<head>
<title>Demonstration of HTML, CSS, and JavaScript</title>
<link rel="stylesheet" href="profilepage.css">
</head>
<body>
<!-- Begin your code here -->
<div class="profile-box">
<div class="bg">
<img src="https://www.capisol.co.za/wp-content/uploads/gaussian-blur-orange-367347-background-wallpapers.jpg" />
</div>
</div>
<!-- End your code here -->
</body>
</html>
profilepage.css
.bg {
width: 100%;
height: 10%;
}
This is how my page looks:
https://i.sstatic.net/RtJHw.png
I would like the width to span the entire first row and the height to be 10% of the page. See example below:
https://i.sstatic.net/tA4Pn.png
The image should end where the black line ends.
I've tried adjusting the width and height multiple times without success. Whenever I change the width, the height also seems to change unexpectedly. Can someone please help me figure out what I'm doing wrong?