Wrap a div - Why two <div> with classes and one without around content?


#1

I'm having no trouble getting the code to work and moving on - My question is more conceptual about the format of creating the elements with divs. For this section, why do you wrap the content in 3 separate div tags? I understand having the divs w/ class selectors to be able to format them later using CSS, but what is the purpose for having the 3rd div nested inside those two?

    <p>Rent from people in over 34,000 cities and 192 countries.</p> 
    </div>
 </div>
 <div class="learn-more">
    <div class="container">
        <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>
 </div>
 <div>

`


#2

Each of the divs around the Travel, Host and Trust code are about to become columns.

This course is leading you up to introducing Bootstrap. Bootstrap makes heavy use of a grid system for page layout.


#3

I'm challenged by the similar issue. What is wrong with my code?







  • My Name Goes Here

  • ...

    • Sign Up

    • ...





#4

Edit your last response and highlight your code. then press the button that says "Preformatted text".

If you have done it right it'll show all your code to the right of the box you're typing in!

Example.

hello

vs

<b><i>hello</b></i>

#6

Not sure what you meant about Preformated Text and button location. Just a newbie here. Instead I took a screen grab of the code. Hopefully you can see this clearly.


#7

take a look at this line of code:

</div class="container">

remember that in Hyper-text markup language (HTML), a forward slash "/" is to indicate a closing statement follows. So for every open statement. <div> there needs to be a closing statement </div>.. Try taking out the forward slash in the second div class, and see if that fixes your problem.