Tell us what’s happening:
Your #chimney should have a top value that puts it at the top of your #house.
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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 */
* {
margin: 0;
padding: 0; box-sizing: border-box;
}
body {
background: #87ceeb;
display: flex; justify-content: center;
align-items: center; height: 100vh;
}
#house {
position: relative; width: 500px; height: 400px; background: #f4d03f;
border: 3px solid #333;
}
#house > * {
position: absolute;
}
#roof {
position:absolute;
top: 0;
left: 75px;
width: 350px; height: 100px; background: #b22222;
border: 2px solid #333;
}
#chimney {
top:0px;
left: 330px;
width: 50px;
height:10px; background-color:#8b4513;
border: 2px solid #333;
z-index: -1;
}
#window-1, #window-2 { width: 80px; height: 80px;
background: #add8e6; border: 2px solid #333;
top: 120px;
}
#window-1 {
left: 80px;
}
#window-2 {
right: 80px;
}
#door {
width: 100px; height: 160px; background: #654321;
border: 2px solid #333;
bottom: 0;
left: 200px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Challenge Information:
Build a House Painting - Build a House Painting