Tell us what’s happening:
Having trouble with #42 "Your windows should be placed below your #roof and at least higher than one third of your #door’s height.” My windows are below the roof, and they are higher than my door. What am I doing wrong?
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>House Painting</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="house">
<div id="chimney"></div>
<div id="roof"></div>
<div id="window-1"></div>
<div id="window-2"></div>
<div id="door"></div>
<div id="grass"></div>
</div>
</body>
</html>
/* file: styles.css */
body {
background-color: #c9d2fc;
}
#roof {
background-color: brown;
width: 500px;
height: 100px;
border: 1px solid black;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 2;
}
#house {
background-color: pink;
width: 500px;
height: 400px;
border: 1px solid black;
position: relative;
top: 200px;
bottom: 0;
left: 100px;
right: 0;
z-index: 2;
}
#chimney {
background-color: red;
width: 125px;
height: 125px;
border: 1px solid black;
position: absolute;
top: -125px;
bottom: 0;
left: 300px;
right: 0px;
z-index: 1;
}
#window-1 {
background-color: white;
width: 100px;
height: 100px;
border: 1px solid black;
position: absolute;
top: 150px;
bottom: 0;
left: 70px;
z-index: 4;
}
#window-2 {
background-color: white;
width: 100px;
height: 100px;
border: 1px solid black;
position: absolute;
top: 150px;
bottom: 0;
left: 350px;
z-index: 4;
}
#door {
background-color: yellow;
width: 125px;
height: 150px;
border: 1px solid black;
position: absolute;
top: 240px;
bottom: 0px;
left: 200px;
z-index: 2;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Challenge Information:
Build a House Painting - Build a House Painting