flex grid bootstrap code example

Example 1: bootstrap col center content

<div class="row">
    <div class="col-4 d-flex justify-content-center text-center">
        // for image and text
    </div>
</div>

Example 2: bootstrap 4 center div

<div class="d-flex justify-content-start">...</div>
<div class="d-flex justify-content-end">...</div>
<div class="d-flex justify-content-center">...</div>
<div class="d-flex justify-content-between">...</div>
<div class="d-flex justify-content-around">...</div>

Example 3: flex wrap bootstrap

<div class="d-flex flex-wrap">...</div>

Example 4: bootstrap col size dinamically

<div class="row">
    <div class="col">
      1 of 2
    </div>
    <div class="col">
      2 of 2
    </div>
</div>

Example 5: display flex usnig bootstrap

<div class="d-flex p-2 bd-highlight">I'm a flexbox container!</div>

Example 6: bootstrap display flex

<div class="d-flex">I'm a flexbox container!</div>

Tags:

Css Example