Grid
Flexocss uses a 16-column grid system built on flexbox. Column widths are calculated automatically accounting for gaps, so layouts never break from spacing math.
Container
The .container centers the content and sets a max-width of 1420px. Add .fluid for a full-width container with no max-width limit.
<!-- Centered, max-width 1420px -->
<div class="container">...</div>
<!-- Full width -->
<div class="container fluid">...</div>
Row
The .row creates a flex container with wrapping enabled. Like the container, it has a max-width of 1420px and centers itself.
<div class="row">...</div>
<div class="row fluid">...</div>
<div class="row block">...</div>
.row— flex row with wrap, max-width 1420px, auto-centered..row.fluid— removes the max-width, takes the full available width..row.block— switches to column direction for stacked layouts.
Columns
Use .fl-box with .fl-{n} where n is a value from 1 to 16. All widths are gap-aware: column calculations subtract the appropriate fraction of the gap so the total always fits perfectly.
<div class="row fluid fl-sm-gap-8">
<div class="fl-box fl-4">4/16</div>
<div class="fl-box fl-4">4/16</div>
<div class="fl-box fl-4">4/16</div>
<div class="fl-box fl-4">4/16</div>
</div>
Examples
Auto width
Use .fl-auto to make columns share the available space equally. This is useful when you don't need precise column control.
<div class="row fluid fl-sm-gap-8">
<div class="fl-box fl-auto">Equal</div>
<div class="fl-box fl-auto">Equal</div>
<div class="fl-box fl-auto">Equal</div>
</div>
Gap
Apply gap classes on the .row to control spacing between columns. The pattern is .fl-{bp}-gap-{value} where value goes from 0 to 80 in steps of 8.
<div class="row fluid fl-sm-gap-16 fl-lg-gap-24 fl-sp-gap-32">
<div class="fl-box fl-8">...</div>
<div class="fl-box fl-8">...</div>
</div>
Gaps are responsive: use different values per breakpoint. Column widths automatically adjust to account for the gap, keeping the layout intact.
Gap comparison
gap 0
gap 16
gap 32
Offset
Push a column to the right using .fl-offset-{n}. The offset is gap-aware, so it accounts for the row gap in its calculation.
<div class="row fluid fl-sm-gap-8">
<div class="fl-box fl-8 fl-offset-4">Offset by 4</div>
<div class="fl-box fl-4">No offset</div>
</div>
Offsets are responsive too. Use .fl-{bp}-offset-{n} to change or reset the offset at different breakpoints.
<div class="fl-box fl-12 fl-offset-2 fl-lg-offset-0">
Offset on mobile, no offset on tablet+
</div>
Nesting
Place a .row inside an .fl-box to create nested grids. Each nested row gets its own 16-column context.
<div class="row fluid fl-sm-gap-8">
<div class="fl-box fl-10">
<div class="row fluid fl-sm-gap-8">
<div class="fl-box fl-8">Nested 8/16</div>
<div class="fl-box fl-8">Nested 8/16</div>
</div>
</div>
<div class="fl-box fl-6">6/16</div>
</div>