Is there an easy class to add to create a five column grid?

Comments

shadcn’s picture

You can try something like this.

<div class="row">
    <div class="col-md-2 col-md-offset-1"></div>
    <div class="col-md-2"></div>
    <div class="col-md-2"></div>
    <div class="col-md-2"></div>
    <div class="col-md-2"></div>
</div>

This will leave 1 col space on the sides.

Does the 5 cols need to take the full container width?

shadcn’s picture

OK found a better solution. Add this to your _layout.scss

.col-md-2-4 {
  @include make-md-column(2.4);
}

Then create your col as follows:

<div class="row">
    <div class="col-md-2-4"></div>
    <div class="col-md-2-4"></div>
    <div class="col-md-2-4"></div>
    <div class="col-md-2-4"></div>
    <div class="col-md-2-4"></div>
</div>

This will take the whole container width and same-width columns.

shadcn’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.