Wrap a div


#1
<div class="learn-more">
<div class="container">


<div
<h3>Travel</h3>
...    
</div>

<div>
<h3>Host</h3>
...   
</div>

<div>
<h3>Trust and safety</h3>
...
</div>
</div>

I've done everything they have told me. Whats wrong?


#2

I think you forgot to close one div at the end of all they should be three like that

<div>
      <h3>Trust and Safety</h3>
      ...
    </div>
  </div>
</div>

#3

I've just tried that. This is what they say "Place the supporting content in the <div class="container">..</div>.


#4

Your code should look like that

<body>
        <div class="jumbotron">
            <div class="container">
           ............
        </div>
            <div class="learn-more">
            <div class= "container">
        <div>
            <h3>Travel</h3>
               ..............
        </div>

        <div>
            <h3>Host</h3>
           ...............
        </div>

        <div>
            <h3>Trust and Safety</h3>
          ..........
        </div>
</body>

#5

Thanks. I appreciate it.


#6

Okay so what does this mean Place the supporting content in the

..
.

#7

Why isn't It showing my entire msg?


#8

How to post code in this forum.


#9

Thanks didn't know that. So this is what their saying.

Place the supporting content in the <div class="container">..</div>.


#10

You have twice before wrapped your code in a div with its container.

In exercise 3, you wrapped your two lists in nav and its container.
In exercise 5, you wrapped your h1 and p elements in jumbotron and its container.

Now you are being asked to wrap the three divs that you just finished writing in exercises 6 and 7.

  1. find your Travel, Host and Trust content that you wrote in exercises 6 and 7
  2. put the opening tags for learn-more and its container on the line before the div that contains the Travel content
  3. put the closing /div tags for learn-more and its container on the line after the div the contains the Trust content.

There -- your Travel, Host and Trust content has now been wrapped in two divs, one called learn-more and one called container.

The pattern you are aiming for is:

<div class="learn-more">
  <div class="container">

    <div>
      ... put Travel code in this div
    </div>

    <div>
      ... put Host code in this div
    </div>

    <div>
      ... put Trust code in this div
    </div>

  </div>  <!-- This closes the container div -->
</div>  <!-- This closes the learn-more div -->

#11

So all you code look like that..


#12

The trouble with that code is that all the content that you wrote for exercises 6 and 7 is missing.

ps. Your nav div has been renamed to jumbotron so there is a problem with your jumbotron content not being in the expected divs.


#13

yeah I know that I post it because he say that he got the same error that I got in that image.


#14

I did exactly what you did and its still not working. Still says the same msg.

 <div class="learn-more">
    <div class="container">
    
    <div
    <h3>Travel</h3>
    </div>
    
    <div>
    <h3>Host</h3>
    </div>
    
    <div>
    <h3>Trust and safety</h3>
    </div>    
    
    </div>    
    </div>

#15

That's because he posted incorrect code as an example.

Why are you using those scraggy Travel, Host and Trust sections, like this:

    <div
    <h3>Travel</h3>
    </div>

when you should have the much more interesting content that you created in exercises 6 and 7, for example:

    <div>
        <h3>Travel</h3>
        <p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
        <p><a href="#">See how to travel on Airbnb</a></p>
    </div>

#16

I did what you said not him re look at my reply. I guess I never did that in the beginning...I just looked at the images not the insturctions..


#17

Oh, yes, I see that now. When I said this:

    <div>
      ... put Travel code in this div
    </div>

I meant to put ALL of your Travel code inside, not just the h3 element.


#18

Okay thanks. '20 char'