My code wont pass. It says the"You should add 5 new div elements" I dont think theres smth wrong with my code. I have already added 5 new divs

" The buildings are too spaced out. Squeeze them together by adding two empty div elements to the top of the .background-buildings element, two more at the bottom of it, and one more in between .bb3 and .bb4 . These will be added as evenly-spaced elements across the container, effectively moving the buildings closer to the center."

here’s my code below:

<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>

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Can you post a link to the challenge pls?

hi, thanks for replying. I’ve passed the challenge by “guessing” what to remove as it says that 5 divs should be there. (but I dont actually understand)

the above is my original code but when I remove the 2 divs before

my code push through... but when I dissect the instruction.
  1. adding two empty div elements to the top of the .background-buildings element
  2. two more at the bottom of it, (which I thought bottom of the `.background-buildings’ element)
  3. One more in between .bb3 and .bb4

total 5 divs

here’s the link:

I guess the first two were the wrong ones?
(They are outside the element but all the divs should be inside?)

1 Like

yes the first two were the wrong ones.

however the first instruction was:

  1. adding two empty div elements to the top of the .background-buildings element
1 Like

so if they instruction said " before the … element" then you go above that line and add the divs. But since they said the “the top of the … element” then that just means to put 2 divs inside but at the top… (if you get what i mean)

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