Tell us what’s happening:
Task 40 for chimney positioning using top attribute is causingproblems in my code i don’t know why! This is driving me nuts
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=""></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: #f4e2d8;
border: 4px solid #333;
margin: 50px auto;
}
#house > div {
position: absolute;
border: 2px solid #333;
background-color: #c2dfff;
}
#chimney {
width: 40px;
height: 80px;
top: 0;
left: 60px;
background-color: #a52a2a;
z-index: -1;
border: 1px;
}
#roof {
width: 100%;
height: 60px;
top: 0;
background-color: #8b0000;
border: 1px;}
#window-1, #window-2 {
width: 60px;
height: 60px;
background-color: #add8e6;
border: 1px;}
#window-1 {
top: 100px;
left: 80px;
}
#window-2 {
top: 100px;
right: 80px;
}
#door {
width: 80px;
height: 120px;
bottom: 0;
left: 210px;
border: 1px;
background-color: #deb887;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0
Challenge Information:
Build a House Painting - Build a House Painting
https://www.freecodecamp.org/learn/full-stack-developer/lab-house-painting/build-a-house-painting