Doubt in step 7 of ferris wheel

So am in Step 7 of the building a ferris wheel project and i am noticing that the curriculum is asking me to give it a property of position as absolute

So my question is why it isn’t inheriting the property of its parent element .wheel which had its position set to absolute ??
I am fairly sure it was happening in building a penguine challenge

/* file: index.html */
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Ferris Wheel</title>
  <link rel="stylesheet" href="./styles.css">
</head>
<body>
  <div class="wheel">
    <span class="line"></span>
    <span class="line"></span>
    <span class="line"></span>
    <span class="line"></span>
    <span class="line"></span>
    <span class="line"></span>

    <div class="cabin"></div>
    <div class="cabin"></div>
    <div class="cabin"></div>
    <div class="cabin"></div>
    <div class="cabin"></div>
    <div class="cabin"></div>
  </div>
</body>
</html>
/* file: styles.css */
.wheel {
border: 2px solid black;
border-radius: 50%;
margin-left: 50px;
position: absolute;
height: 55vw;
width: 55vw;
max-width: 500px;
max-height: 500px;
}

.line {
background-color: black;
width: 50%;
height: 
}
  **Your browser information:**

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

Challenge: Step 7

Link to the challenge:

Some properties are inheritable, others are not. Positioning is not one of them.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.