Get rid of Gutter in TwitterBootstrap

后端 未结 9 1589
迷失自我
迷失自我 2021-02-04 11:29

Maybe I\'m crazy but is there not a way to get rid of the 20px gutter on the twitter bootstrap? For example I\'ve used frameworks that use an alpha and omega that over-ride the

9条回答
  •  青春惊慌失措
    2021-02-04 12:32

    I know this is an old topic...but I'm sure it's still an issue for folks. I found this very useful CSS that solved it for me. Enjoy!

    /* remove spacing between middle columns */
    .row.no-gutter [class*='col-']:not(:first-child):not(:last-child) {
      padding-right:0;
      padding-left:0;
    }
    /* remove right padding from first column */
    .row.no-gutter [class*='col-']:first-child {
      padding-right:0;
    }
    /* remove left padding from first column */
    .row.no-gutter [class*='col-']:last-child {
      padding-left:0;
    }
    
    /* only for column content visible */
    .col-lg-1>div {background-color:#ffffd;}
    

    CSS Source - http://bootply.com/109530

提交回复
热议问题