Create a simple 5 column flexbox css grid

$total-columns: 5; $responsive-breakpoint: 767px; .row { display: flex; } [class*=col-] { display: inline-block; width: 100%; } @for $i from 1 through $total-columns { @media (min-width: $responsive-breakpoint){ .col-#{$i} { width: ($i / $total-columns) * 100%; } } }
Create a simple 5 column flexbox css grid

Can increase column numbers by increasing `$total-columns`

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.