2

Within the following example https://codepen.io/centem/pen/GQVGmw I'm trying to center the divs that have numbers inside them with a .centered class but it does not center. How do I center these so they sit in the middle of the row instead of to the left?

CSS:

.centered {
  margin: 0 auto;
}

DIVs:

<div class="row">
  <div id="83" class="square centerd">83</div>
  <div id="84" class="square centered">84</div>
  <div id="85" class="square centered">85</div>
</div>
Temani Afif
  • 245,468
  • 26
  • 309
  • 415

1 Answers1

6

Simple:

<div class="row justify-content-center">
  <div id="83" class="square centerd">83</div>
  <div id="84" class="square centered">84</div>
  <div id="85" class="square centered">85</div>
</div>