-1

I am trying to understand how angular calculates how the elements are rendered in the dom. more specifically, how row and column work

I added some examples below with what i was expecting to see but i dont see what I am expecting in any case lol

rows vs colums


<p>this should be displayed one below the other one I would expect, but it displays one next to the other</p>
<button class="btn btn-success">Start game</button>
<button class="btn btn-danger">Stop</button>

<p>this should be displayed in two columns I would expect, but i see two rows </p>
<div class="row">
  <div class="col-xs-6">
    <p>hi</p>
  </div>
  <div class="col-xs-6">
    <p>bye</p>
  </div>
</div>

<p>this should be displayed in two colums, i would expect, but it shows up as 2 rows </p>

<div class="row">
  <div class="col-xs-6">
    <button class="btn btn-success">Start game</button>
  </div>
  <div class="col-xs-6">
    <button class="btn btn-danger">Stop</button>
  </div>
</div>

1
  • 1
    Is the outer container element a thinner width than 100%? Commented Nov 16, 2022 at 17:24

1 Answer 1

1

In order to use the grid system, your rows and columns must at some point be descendants of an element with the .container class.

Latest 5.2 docs on container, but I think this applies all the way back to Bootstrap 3.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.