Learn CSS Variables by Building a City Skyline - Step 21

Tell us what’s happening:
Describe your issue in detail here.
I need hep with were to insert my divs. It seems like I need to insert 5 but when I do, there’s error. Help.
Your code so far

  <div></div>
    <div></div>
    <div class="background-buildings">
       <div></div>
    <div></div>
      <div class="bb1">
        <div class="bb1a"></div>
        <div class="bb1b"></div>
        <div class="bb1c"></div>
        <div class="bb1d"></div>
      </div>
      <div class="bb2"></div>
      <div class="bb3"></div>
      <div></div>
      
      <div class="bb4"></div>
      <div></div>
      <div></div>
    </div>

Your browser information:

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

Challenge: Learn CSS Variables by Building a City Skyline - Step 21

Link to the challenge:

It looks like you’ve added too many div elements. I can’t see your full code but perhaps if you remove the very top two, you might pass this step? The other div elements look to have been added correctly, in accordance with the instructions.

1 Like

When I remove the top divs, it tells me that they are needed. Until I have more than 5 divs and it tells me that it needs 5 divs. I’m experincing frustration. Let me take a break.

Sure. If you can’t figure it out, post your full HTML code here and we should be able to help!

What @igorgetmeabrain said is correct

I used your code, and got rid of the top two divs and it passed the challenge. If getting rid of those two did not work then there is probably an issue in another area of your code

3 Likes

Thanks you very much, the code works

1 Like

Removing the two divs on top allows you to pass the code. However i would like to know why that is when the instructions state " Squeeze them together by adding two empty div elements to the top of the .background-buildings element"

1 Like

Yes i agree that removing the two divs on top brings you back down from 7 to 5 divs. However my question is in regards to the instructions given which to me and many of us does not make sense. I think theirs a fundamental error in this step.

1 Like