I’ve tried everything I can think of, but I cannot pass test 42. Could someone please tell me what I’m doing wrong?
“42. Your windows should be placed below your #roof and at least higher than one third of your #door’s height.”
https://www.freecodecamp.org/learn/full-stack-developer/lab-house-painting/build-a-house-painting
:root {
--midnight-blue: #222233;
--night-blue: #444455;
--moonface-light: #FCE5AC;
--house-color: #BA8585;
--roof-color: #994422;
--door-color: #442200;
--window-color: #305877;
--chimney-color: #773322;
}
body {
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
margin: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
background: linear-gradient(135deg, var(--midnight-blue) 0%, var(--night-blue) 50%);
}
/* house */
#house {
position: relative;
width: 500px;
height: 400px;
background-color: #BA8585;
border: .5px solid #442211;
z-index: 1;
}
#chimney {
position: absolute;
width: 50px;
height: 60px;
background-color: var(--chimney-color);
background: linear-gradient(to bottom, #863f31, #551100 50%, #551100 50%, #551100);
background-size: 100% 20px;
border: 1px solid #551100;
top: -61px;
right: 100px;
z-index: -1;
}
#roof {
position: absolute;
width: 600px;
--p: 50px; /* control the shape (can be percentage) */
height: 120px;
aspect-ratio: 3/1;
clip-path: polygon(var(--p) 0,calc(100% - var(--p)) 0,100% 100%,0 100%);
background-color: var(--roof-color);
background: repeating-linear-gradient(45deg, #772211, #994422 10px, #863f31 10px, #712f15 20px);
border: 2px solid #551100;
top: 0;
left: -50px;
}
#window-1 {
position: absolute;
width: 80px;
height: 80px;
background-color: var(--window-color);
border: 3px inset #F9FBD3;
top: 180px;
left: 60px;
}
#window-2 {
position: absolute;
width: 80px;
height: 80px;
background-color: var(--window-color);
border: 3px inset #F9FBD3;
top: 180px;
right: 60px;
}
#door {
position: absolute;
width: 100px;
height: 145px;
background-color: var(--door-color);
border: 5px solid #331100;
bottom: 0;
left: 200px;
border-radius: 5px 5px 0 0;
}
#doorknob {
position: absolute;
width: 15px;
height: 15px;
background-color: #3e1e0e;
border: 1px outset #a55a34;
border-radius: 50%;
top: 80px;
right: 8px;
box-shadow: -1px 1px 4px black;
}
/* background*/
.ground {
height: 150px;
width: 100%;
background: #261a3b;
}
.moon {
position: fixed;
width: 100px;
height: 100px;
top: 120px;
right: 200px;
border-radius: 50%;
box-shadow: 0 0 100px var(--moonface-light);
}
.moon svg {
scale: 1.6;
}
.star {
position: absolute;
width: 10px;
height: 10px;
border-radius: 50%;
background: #fdfdff;
top: 40px;
left: 45vw;
z-index: -1;
animation: flicker 1.5s linear infinite;
}
.star:nth-child(1) {
scale: 0.6;
animation-delay: 0.3s;
}
.star:nth-child(2) {
top: 96px;
left: 62vw;
animation-delay: 0.5s;
}
.star:nth-child(3) {
top: 159px;
left: 77vw;
scale: 0.6;
animation-delay: 1s;
}
.star:nth-child(4) {
top: 359px;
left: 81vw;
scale: 0.7;
animation-delay: 0.5s;
}
.star:nth-child(5) {
top: 208px;
left: 51vw;
scale: 0.6;
}
.star:nth-child(6) {
top: 290px;
left: 20vw;
scale: 0.6;
animation-delay: 1s;
}
.star:nth-child(7) {
top: 339px;
left: 7vw;
scale: 0.6;
animation-delay: 0.3s;
}
@keyframes flicker {
0% {
opacity: 1;
}
50% {
opacity: 0.1;
}
100% {
opacity: 1;
}
}