Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 4

Anyone know how to add two span element within the
following code: span class=“flex”

It really, really helps if you don’t delete the link to the challenge, provide your code, and tell us what you have tried and how the instructions have you stuck.

Here is sample code showing how to nest elements:

<span>
  <span>
  </span>
  <span>
    <div></div>
  </span>
</span>

well the point of what I did is to not give answers to others sorry

Thanks for your help

I’m not sure how providing a link to the challenge and providing the code you tried that doesn’t work prevents ‘giving the answers to others’? Those seem unrelated?

How do I delete the free code camp forum

You can’t delete the entire forum? I really don’t understand what you are asking.

How do i delete the forum account it wont let me

 <span>
  </span>
  <span>
    <div></div>
  </span>
</span>
          <span class="flex"></span>
          <div id="header"> 
                <h1>AcmeWidgetCorp</h1> 
                <h2>Balance Sheet</h2> 
                </div> 
                  </div> 
          </span>

this problem is super difficult

Tried your solution. it failed
here is the link to the problem

here is what i have tried

  <span>
  </span>
  <span>
    <div></div>
  </span>
</span>
          <span class="flex"></span>
          <div id="header"> 
                <h1>AcmeWidgetCorp</h1> 
                <h2>Balance Sheet</h2> 
                </div> 
                  </div> 
          </span>

hello again.

I’m sorry you’re having a hard time.

If you take a look at the sample code I gave earlier (not a solution but sample
, so you should not copy it as-is just look at it to understand it), you may notice a pattern in how I placed the elements. This pattern is a general one that hopefully teaches the idea of ‘nesting’. Let me post it here again for discussion.

<span>        <=== this is the outer-most span open-tag
  <span>      <=== this span is *nested* inside the outer-most span
  </span>     <=== this closes that span now
  <span>      <=== this is another span which is nested inside the *outer-most* span
    <div></div>   <=== this is a div inside the parent span on the previous line
  </span>     <=== this closes the span (opened 2 lines above)
</span>       <=== this closes the outer-most span

So in this exercise you have created so far (before you copied my sample code hopefully), one span as indicated by the instructions which looks like this:

If we re-write that one span onto 2 lines we get this:

<span class="flex">
</span>

Now you need to nest 2 more spans inside.
Given the sample code provided above, what do you think you can do at this point?

1 Like

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