cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              
  <body>
    <!-- Navbar -->
    <nav class="top-nav navbar navbar-inverse">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="http://arnique.net"><span class="pcolor">Arnique</span>.net</a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="https://codepen.io/Arnique/">More Cool Demos</a></li>
            <li class="marked"><a href="http://arnique.net/uncategorized/58/a-quick-guide-to-changing-bootstraps-gutter-width/">Read this article</a></li>
          </ul>
        </div>
        
      </div>
    </nav>
    <!-- /Navbar -->
    
    <!-- Content -->
    <div class="container-fluid content">
    
      <header>
        <h2>Resizing Bootstrap's Gutter</h2>
        <p>A simple method of changing bootstrap's default gutter size.<br/>The resizing classes are displayed at the bottom. For a full explanation you can read <a href="http://arnique.net/uncategorized/58/a-quick-guide-to-changing-bootstraps-gutter-width/">this</a> article</p>
        Gutter size: <span id="val">30px</span>
        <div id="slider"></div>
      </header>
      
      <div class="row live-gutter">
        <div class="col-xs-3"></div>
        <div class="col-xs-3"></div>
        <div class="col-xs-3"></div>
        <div class="col-xs-3"></div>
      </div>
      <textarea id="css-box">
      </textarea>
    
    </div>
    <!-- /Content -->
  
    <footer>
      &copy; 2015. More web design wisdom at <a href="http://arnique.net">Arnique.net</a>
    </footer>

  </body>


            
          
!
            
              /* Styles */
.pcolor {
  color: #27A2D5;
}
.top-nav {
  border:none;
}
.top-nav.navbar .navbar-brand  {
  background:url(http://arnique.net/demos/assets/logo-icon.png) 15px center no-repeat;
  padding-left: 55px;
  color: #fff;
}
.top-nav .navbar-right li {
  border-left:1px solid rgba(255,255,255,0.1);
}
.top-nav .navbar-nav .marked > a {
  background:#27A2D5;
  color: #fff;
}
body {
  font: 15px  "Roboto Condensed", Arial, sans-serif;
  line-height: 1.7em;
  color: #888; 
  background: #fff;
}

h1, h2 {
  color: #333;
}

footer {
  text-align:center;
  margin:60px auto 0 auto;
  padding:20px 0;
  border-top: 1px solid #ddd;
}
.content {
  max-width:750px;
}

header {
  text-align:center;
  margin:60px 0;
}

#slider {
  width: 400px;
  margin:15px auto 0 auto;
}

#val {
  color: #C21D2E;
  font-weight:bold;
}

.live-gutter >div:after {
  content: "";
  background: #ddd;
  height:150px;
  width:100%;
  display: block;
}

#css-box{
  width:100%;
  padding: 20px;
  border: 2px solid #ddd;
  height:300px;
  margin:30px 0;
}

            
          
!
            
                  $().ready(function() {
      var $liveStyle = $("#live-style"); // Refers to a <style> tag in the head 
      var $cssBox = $("#css-box");

      updateCssBox("", 30);

      function updateCssBox(str, val) {
        var styles = str || $liveStyle.html();
        $cssBox.val(styles.replace(/live-gutter/g, "gutter-" + val));
      }

      function updateStyles(val) {
        //We're changing the page styles to make sure our classes actually work
        var styleStr = $liveStyle.html();
        styleStr = styleStr.replace(/\d+px/g, (val/2) + "px");
        $liveStyle.html(styleStr);
        updateCssBox(styleStr, val);
      }

      $("#slider").slider({
        value: 30,
        min: 0,
        max: 60,
        step: 2,
        slide: function(event, ui) {
          $("#val").html(ui.value + "px");
          updateStyles(ui.value);
        }
      });

    });
            
          
!
999px
Loading ..................

Console