Hello
May someone give a hint on meeting the following request?
“Both your windows and your door should have either left
or right
set to a value that places them within the house borders.”
The error thrown is:
" You should set either left
or right
on your windows and arrange them within the house borders."
This is my code
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 class="container">
<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>
</div>
</body>
</html>
CSS
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
.container {
background-color: rgb(240,240,240);
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
#house {
background-color: rgb(255,255,255);
border: 1px solid rgba(0,0,0,0.2);
width: 500px;
height: 400px;
position: relative;
z-index: 5;
}
#chimney {
position: absolute;
/* background-color: rgba(0,0,0,0.8); */
background-color:rgba(0,0,0,1);
border: 1px solid rgba(0,0,0,0.2);
height: 40px;
width: 50px;
top: -40px;
left: 25px;
z-index: 1;
}
#roof {
background-color: rgba(0,0,0,1);
border: 1px solid rgba(0,0,0,0.2);
position: absolute;
top: 0;
left: -2%;
width: 104%;
height: 250px;
z-index: 10;
}
#door {
position: absolute;
bottom: 0;
left: 20%;
height: 75px;
width: 10%;
background-color: rgba(0,0,0,0.8);
border: 1px solid rgba(0,0,0,0.2);
}
#window-1 {
position: absolute;
left: 350px;
height: 25px;
width: 100px;
top: 275px;
background-color: rgba(0,0,0,0.8);
border: 1px solid rgba(0,0,0,0.2);
}
#window-2 {
position: absolute;
left: 200px;
height: 25px;
width: 50px;
top: 275px;
background-color: rgba(0,0,0,0.8);
border: 1px solid rgba(0,0,0,0.2);
}
Thanks,