hussain hussain - 1 month ago 9
CSS Question

How to remove space between bootstrap columns?

I want to remove the space between multiple columns in the bootstrap grid. How can we overwrite Bootstraps CSS to achieve this task or any other better solution with pure CSS?

main.html

<div class="row">
<div class="col-md-2">
//stuff here for this column
</div>
<div class="col-md-10">
//stuff here for columns
</div>
</div>

Answer

add a class when you need to remove spaces use it

.padding-0{
    padding-right:0;
    padding-left:0;
}

in html write this class

<div class="row">
   <div class="col-md-2 padding-0">
       //stuff here for this column
   </div>
   <div class="col-md-10 padding-0">
       //stuff here for columns
   </div>
</div>
Comments