Tell us what’s happening:
I am trying to put the chimney on top of the house. I believe I have the code right. However it is giving me the text “Your #chimney should have a top value that puts it at the top of your #house.” I can’t see where I have an error in my code.
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">
<link rel="stylesheet" href="styles.css">
<title>House Painting</title>
</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 {
position: relative;
width: 500px;
height: 400px;
background-color: #F54927;
border: 5px solid #BA280B;
}
#chimney {
position: absolute;
top: -20px;
width: 50px;
height: 100px;
background-color: gray;
border: 2px solid black;
z-index: -1;
}
#roof {
position: absolute;
top: 0;
width: 500px;
height: 100px;
background-color: #8F3E2C;
border: 2px solid #B35900;
}
#window-1 {
position: absolute;
top: 150px;
left: 50px;
width: 100px;
height: 100px;
background-color: #C28576;
border: 5px solid #B35900;
}
#window-2 {
position: absolute;
top: 150px;
right: 50px;
width: 100px;
height: 100px;
background-color: #C28576;
border: 5px solid #B35900;
}
#door {
position: absolute;
bottom: 0;
left: 200px;
width: 100px;
height: 150px;
background-color: #9E7E7A;
border: 5px solid #B35900;
}
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
Challenge Information:
Build a House Painting - Build a House Painting