Build a House Painting - Build a House Painting

Tell us what’s happening:

Kindly help, how can resolve the bellow error:

  1. Your windows should be placed below your #roof and at least higher than one third of your #door’s height.
    // tests completed

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="window-1"></div>
    <div id="window-2"></div>
    <div id="door"></div>
</div>
</body>
</html>
/* file: styles.css */
body{
  width: 600px; 
 height: 600px;
background-color: lightgreen;
;
}

#house {
  position: relative;
  width: 500px;
  height: 400px;
  background-color: skyblue;
  border: 2px solid black;
  max-width: 100%;
  max-height: 100vh;
  margin-top: 100px;
  
}

#house div {
  position: absolute;
}

#roof {
  top: 0;
  width: 100%;
  height: 60px;
  background-color: brown;
  border: 3px solid brown;
}

#door {
  position: absolute;
background-color: darkgrey;
  width: 100px;
  height: 120px;
  bottom: 0;
  left: 190px;
  right: 150px;
  border: 4px solid black; 
}

#window-1 {
  position: absolute;
  background-color: darkgrey;
  border: 3px solid black;
  width: 70px;
  height: 70px;
  top: 100px;
  left: 40px;
}

#window-2 {
  position: absolute;
background-color: darkgrey;
  border: 3px solid black;
  width: 70px;
  height: 70px;
  top: 100px;
  right: 60px;
}

#chimney {
  width: 70px;
  height: 80px;
background-color: darkred;
  position: relative;
  top: -80px;
  left: 350px;
  border: 2px solid black;
  z-index: -5;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36

Challenge Information:

Build a House Painting - Build a House Painting

you are using relative units for some measurements, the door is moving

do not use 100vh for the house height

1 Like

thank you. I managed to solve it.