Why I need to add many divs inside each other

Tell us what’s happening:

Why do I need to create more than one div inside each other even I can add elements in only one div. Can you explain why I need more than div how they are in this question inside each other?


<div class="container-fluid">
<h3 class="text-primary text-center">jQuery Playground</h3>
<div class="row">
  <div class="col-xs-6">
    <div class="well">
    
    </div>
  </div>
  <div class="col-xs-6">
    <div class="well">
    
    </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/92.0.4515.107 Safari/537.36

Challenge: Create Bootstrap Wells

Link to the challenge:

I edited your post to move the question out of the code block.


In this case, most of that is just part of the Bootstrap grid system (container > row > column). You can look at the Bootstrap docs to read more about the grid system (the challenge is using V3, you can also look at the V5 docs).

Thank you! Now more clear.

If when we want to use particular inside a div it would be easy. and HTML uses a hierarchical structure. that is why

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