Get rid of Gutter in TwitterBootstrap

后端 未结 9 1408
迷失自我
迷失自我 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:18

    Just download a custom version of the framework from here

    http://twitter.github.com/bootstrap/customize.html#variables

    and make the gridGutter = 0px

    0 讨论(0)
  • 2021-02-04 12:30

    Had the same problem, this solved it for my pretty nice:

    .row.no-gutter {
      margin-left: 0;
      margin-right: 0;
    }
    .row.no-gutter [class*='col-']:not(:first-child),
    .row.no-gutter [class*='col-']:not(:last-child) {
      padding-right: 0;
      padding-left: 0;
    }
    
    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题