Bootstrap container-fluid padding

后端 未结 13 2079
情话喂你
情话喂你 2021-02-12 22:38

The following HTML is generating unwanted padding:

 
13条回答
  •  忘了有多久
    2021-02-12 23:17

    In this case, the column is actually causing the padding, which is written into the bootstrap .css file.

    You didn't mention what version of Bootstrap you're using, I assume 3.x?

    I usually add a custom class to my own .css file to eliminate padding when it's not wanted, such as:

    .noPadding {
    padding: 0 !important;
    }
    

    Then add the class to your column like so:

    test

    This article helped me understand the basics of the Bootstrap grid system and how it handles margins and padding.

    Bootstrap 4 will include padding and utility classes to manipulate padding more precisely. Read about it here

提交回复
热议问题