Golang Tutorials - Learn Go Programming with Easy Step-by-Step Guides

Explore comprehensive Golang tutorials for beginners and advanced programmers. Learn Go programming with easy-to-follow, step-by-step guides, examples, and practical tips to master Go language quickly.

Bs5 Grid Small in Bootstrap

Bs5 Grid Small in Bootstrap

Got it! Here's a concise guide on Bootstrap 5 Grid Small (.col-sm-*) — perfect for small screens (?576px).


? Bootstrap 5 .col-sm-* Grid Basics

  • .col-sm-* classes apply at small devices and up, meaning screens 576px wide or wider.

  • On screens smaller than 576px (extra small), columns stack vertically (full width) unless .col-* (no breakpoint) or other smaller classes are used.


? Basic .col-sm-* Example

<div class="container">  <div class="row">    <div class="col-sm-6">Half width on small+</div>    <div class="col-sm-6">Half width on small+</div>  </div></div>
  • On screens ?576px, columns take half width each.

  • On smaller screens, columns stack.


? Responsive Mixed Breakpoints

<div class="container">  <div class="row">    <div class="col-12 col-sm-8">Full width xs, two-thirds width sm+</div>    <div class="col-6 col-sm-4">Half width xs, one-third width sm+</div>  </div></div>

? Offsets on Small Screens .offset-sm-*

<div class="container">  <div class="row">    <div class="col-sm-4 offset-sm-4">Centered on small+</div>  </div></div>

? Ordering on Small Screens .order-sm-*

<div class="container">  <div class="row">    <div class="col-sm-4 order-sm-3">Third on small+</div>    <div class="col-sm-4 order-sm-1">First on small+</div>    <div class="col-sm-4 order-sm-2">Second on small+</div>  </div></div>

Recap for .col-sm-* classes

ClassApplies fromDescription
.col-sm-*? 576pxColumn width on small+
.offset-sm-*? 576pxOffset column on small+
.order-sm-*? 576pxChange order on small+

Bonus: Auto-layout on Small Screens

<div class="row">  <div class="col-sm">Equal width col 1</div>  <div class="col-sm">Equal width col 2</div>  <div class="col-sm">Equal width col 3</div></div>
  • Columns share space equally on small+ screens.


Want me to show examples combining small with other breakpoints, or full responsive layout templates?

Disclaimer for AI-Generated Content:
The content provided in these tutorials is generated using artificial intelligence and is intended for educational purposes only.
html
docker
php
kubernetes
golang
mysql
postgresql
mariaDB
sql