The row as a margin:-15
so it is larget than its container(-fluid).
Is there a reason for it ? How to cut it out (properly) ?
The row as a margin:-15
so it is larget than its container(-fluid).
Is there a reason for it ? How to cut it out (properly) ?
By design, there is a 15px
space between 2 columns in bootstrap. And when implementing it, bootstrap's creator uses CSS properties called padding-left
and padding-right
to set the left and right padding of the column so that the requirement could be full-filled.
Reference: access this link and search for Gutter Width
But there is a problem. The first column only needs padding-right
and the last column only needs padding-left
.
To solve that problem, bootstrap's creator comes up with a solution in which they sets the left and right margin of the row
to be -15px
(negative padding is not supported in CSS).
I usually create another CSS class that adjust the padding / margin then append it after the row
class.