Skip to content
Justice Tech School

Auto Layout Columns

Without numbers, columns share space. Use .col-auto to fit content and .w-100 to force a line break.

Example
<div class="row">
  <div class="col-auto">Fits content</div>
  <div class="col">Takes the rest</div>
</div>

Exercise

Fit to content.

col-

Quiz Test

What does col-auto do?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.