Bootstrap 5 Grid: Extra Small Device

tashi guda na tashi gudun guda

XSmall Small Medium Large Extra Large XXL
kainin da kainin .col- .col-sm- .col-md- .col-lg- .col-xl- .col-xxl-
sokoni gudun <576px >=576px >=768px >=992px >=1200px >=1400px

yimama na yin gudun dukiwa dukiwa na dukiwa na gudun guda. na dukiwa na gudun guda yin:alldukai gudun 25% / 75%.

namuna yin na kananin da dukiwa gudun guda:

<div class="col-3">....</div>
<div class="col-9">....</div>

tasi na yaan na kaiya kaiya 25% / 75% na gudun duki (tashi, kaiya, mada, guda, tashin guda, da kaiya guda):

Example

<div class="container-fluid">
  <div class="row">
    <div class="col-3 bg-primary">
      <p>World Wide Fund for Nature (WWF), founded on April 29, 1961, its logo is a panda ...</p>
    </div>
    <div class="col-9 bg-dark">
      <p>1980, WWF officially came to China, invited by the Chinese government to carry out the protection work of pandas and their habitats ...</p>
    </div>
  </div>
</div>

Try it yourself

kare:tama yin kan ta kaiya kaiya ka yuwa 12 (kaiya ka kaiya 12 na yin lie):

For 33.3% / 66.6% split, you should use .col-4 and .col-8(For 50% / 50% split, you should use .col-6 and .col-6):

Example

<!-- 33.3%/66.6% split -->
<div class="container-fluid">
  <div class="row">
    <div class="col-4 bg-primary">
      <p>World Wide Fund for Nature (WWF), founded on April 29, 1961, its logo is a panda ...</p>
    </div>
    <div class="col-8 bg-dark">
      <p>1980, WWF officially came to China, invited by the Chinese government to carry out the protection work of pandas and their habitats ...</p>
    </div>
  </div>
</div>
<!-- 50%/50% split -->
<div class="container-fluid">
  <div class="row">
    <div class="col-6 bg-primary">
      <p>World Wide Fund for Nature (WWF), founded on April 29, 1961, its logo is a panda ...</p>
    </div>
    <div class="col-6 bg-dark">
      <p>1980, WWF officially came to China, invited by the Chinese government to carry out the protection work of pandas and their habitats ...</p>
    </div>
  </div>
</div>

Try it yourself

Automatic layout columns

In Bootstrap 5, there is a simple way to create automatic layout columns for all devicescolumns of equal width: Just from .col-* Remove the number and use only on the col element .col Class. Bootstrap will recognize how many columns there are, and each column will receive the same width:

<!-- Two columns: 50% width -->
<div class="row">
  <div class="col">1 of 2</div>
  <div class="col">2 of 2</div>
</div>
<!-- Four columns: 25% width -->
<div class="row">
  <div class="col">1 of 4</div>
  <div class="col">2 of 4</div>
  <div class="col">3 of 4</div>
  <div class="col">4 of 4</div>
</div>

Try it yourself

The next chapter will show how to add different split percentages for small devices.