Tell us what’s happening:
Assist to inspect the CSS code and correct: #chimney {
width: 60px;
height: 100px;
background-color: #8b0000;
border: 2px solid #000;
top: 10px; /* FCC REQUIRES THIS /
left: 50px;
z-index: -1; / Behind house (FCC definition) */} It keeps showing error that
16
17
18
19
styles.css
24
23
22
25
26
Your #chimney should have a top value that puts it at the top of your #house This is Build a house painting project:
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>House Project</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>
</body>
</html>
/* file: styles.css */
/* HOUSE */
#house {
position: relative;
width: 500px;
height: 400px;
background-color: #f2d7a6;
border: 3px solid #333;
}
/* All children must be absolute */
#house > div {
position: absolute;
}
/* CHIMNEY — must touch true top of house */
#chimney {
width: 60px;
height: 100px;
background-color: #8b0000;
border: 2px solid #000;
top: 10px; /* FCC REQUIRES THIS */
left: 50px;
z-index: -1; /* Behind house (FCC definition) */
}
/* ROOF — must be slightly lower than chimney top to pass FCC tests */
#roof {
width: 100%;
height: 80px;
background-color: #a52a2a;
border: 3px solid #000;
/* KEY FIX: roof must NOT sit at the same pixel as the chimney */
top: 0px;
}
/* WINDOWS */
#window-1,
#window-2 {
width: 80px;
height: 80px;
background-color: #87cefa;
border: 2px solid #000;
top: 120px;
}
#window-1 {
left: 50px;
}
#window-2 {
right: 50px;
}
/* DOOR */
#door {
width: 120px;
height: 150px;
background-color: #8b4513;
border: 3px solid #000;
bottom: 0;
left: 190px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0
Challenge Information:
Build a House Painting - Build a House Painting