Tell us what’s happening:
Describe your issue in detail here.
In the Picasso Painting Step 8: The width and height properties as a percentage are working fine in the freecodecamp.org lesson. However I am using my own editor to work alongside the lesson. With this step, I noticed that my html file on my browser does not reflect the width: 100%; and height: 60%; change. I have rechecked my code on both html and css, and it is the exact same as how it is written on freecodecamp. I noticed that it is reflected once i replace the percentages with pixel values. I would like to know why it is working on freecodecamp lesson but not on my one files, and how can i use the same width and height percentage values on mine.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Picasso Painting</title>
<link rel="stylesheet" href="./styles.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
</head>
<body>
<div id="back-wall"></div>
</body>
</html>
/* file: styles.css */
body {
background-color: rgb(184, 132, 46);
width: 100%;
height: 60%;
}
#back-wall {
background-color: #8B4513;
/* User Editable Region */
/* User Editable Region */
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Challenge: Learn Intermediate CSS by Building a Picasso Painting - Step 8
Link to the challenge: