0

I am trying to develop a bootstrap template and facing a problem with grid system. In my template it has five columns in a row. Each column must be equal. It will not be a problem if it is three, four or six columns. I can write it easily by col-md-3 or col-md-4 or col-md-6 . But how can i right that for five columns. Is there any way or need to write custom css? Please tell me.

Bir
  • 794
  • 1
  • 15
  • 31

2 Answers2

0

Write your own selector col-md-5 and just copy properties from that selectors and set width: to a 20%. That should works :)

kgruszowski
  • 76
  • 2
  • 9
0

Actually it is quite simple if you are using bootstrap 4. just do like this and there will be equal 5 columns.

<div class="container-fluid">
  <h3>Bootstrap 4 Five Columns</h3>
  <div class="row">
    <div class="col">
      <h3>column 1</h3>
    </div>
    <div class="col">
      <h3>column 2</h3>
    </div>
    <div class="col">
      <h3>column 3</h3>
    </div>
    <div class="col">
      <h3>column 4</h3>
    </div>
    <div class="col">
      <h3>column 5</h3>
    </div>
  </div>

Also sharing reference link below for further understanding. Equal Columns