Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="text-center p-5">
  <button class="btn btn-primary changeBS">Load bootstrap 4</button>
</div>

<!-- NORMAL BEHAVIOR WITH CLASSIC FLOATS -->

<div class="portlet container card">
  <div class="row widget">
      <div class="col-12 d-block">
        <div class="widget-title float-left text-secondary mb-3">
          NORMAL BEHAVIOR WITH COLLISION CLASSIC FLOATS
        </div>

        <div class="widget-toolbar float-right text-right mb-4">
          <button class="btn btn-secondary btn-borderless btn-sm">Tool</button>
          <button class="btn btn-secondary btn-borderless btn-monospaced btn-sm">
            <svg class="lexicon-icon lexicon-icon-ellipsis-v" viewBox="0 0 512 512">
              <path class="lexicon-icon-outline" d="M319 255.5c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path><path class="lexicon-icon-outline" d="M319 448c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path><path class="lexicon-icon-outline" d="M319 64c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path>
            </svg>
          </button>
          <button class="btn btn-outline-primary btn-borderless btn-sm">
            <svg class="lexicon-icon lexicon-icon-plus mr-1" viewBox="0 0 512 512">
              <path class="lexicon-icon-outline" d="M479.82 224.002h-192.41v-191.91c0-17.6-14.4-32-32-32v0c-17.6 0-32 14.4-32 32v191.91h-191.41c-17.6 0-32 14.4-32 32v0c0 17.6 14.4 32 32 32h191.41v191.91c0 17.6 14.4 32 32 32v0c17.6 0 32-14.4 32-32v-191.909h192.41c17.6 0 32-14.4 32-32v0c0-17.6-14.4-32-32-32z"></path>
            </svg>
            Admin
          </button>
          <button class="btn btn-outline-primary btn-borderless btn-monospaced btn-sm">
            <svg class="lexicon-icon lexicon-icon-ellipsis-v" viewBox="0 0 512 512">
              <path class="lexicon-icon-outline" d="M319 255.5c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path><path class="lexicon-icon-outline" d="M319 448c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path><path class="lexicon-icon-outline" d="M319 64c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path>
            </svg>
          </button>
          <button class="btn btn-primary btn-sm">
            <svg class="lexicon-icon lexicon-icon-plus mr-1" viewBox="0 0 512 512">
              <path class="lexicon-icon-outline" d="M479.82 224.002h-192.41v-191.91c0-17.6-14.4-32-32-32v0c-17.6 0-32 14.4-32 32v191.91h-191.41c-17.6 0-32 14.4-32 32v0c0 17.6 14.4 32 32 32h191.41v191.91c0 17.6 14.4 32 32 32v0c17.6 0 32-14.4 32-32v-191.909h192.41c17.6 0 32-14.4 32-32v0c0-17.6-14.4-32-32-32z"></path>
            </svg>
            Admin
        </button>
        </div>
      </div>
   </div>

  <div class="row my-3">
    <h1 class="col title">
      Application title
    </h1>

    <div class="col-auto widget-toolbar">
      <button class="btn btn-outline-primary btn-borderless btn-monospaced btn-sm">
        <svg class="lexicon-icon lexicon-icon-ellipsis-v" viewBox="0 0 512 512">
          <path class="lexicon-icon-outline" d="M319 255.5c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path><path class="lexicon-icon-outline" d="M319 448c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path><path class="lexicon-icon-outline" d="M319 64c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path>
        </svg>
      </button>
      </div>
  </div>

  <div class="row widget-metadata mb-3">
    <div class="col-auto widget-user">
      <span class="rounded-circle sticker sticker-lg sticker-success">MC</span>
    </div>

    <div class="widget-metadata">
      <a href="#" class="widget-user-name text-dark">Marcos Castro</a>
      <p class="widget-date small text-secondary mb-0">Sep 25 - 3 Views</p>
    </div>
  </div>
  
  <p>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse mollis nunc quis euismod vestibulum. Nullam tincidunt ultricies augue. Nulla suscipit finibus sapien. Aenean porta enim dapibus orci finibus, sed sodales ante sollicitudin. Donec sed quam ultrices, ullamcorper risus vel, laoreet eros. Vestibulum nec ex sed libero sagittis pulvinar. Fusce vitae sagittis nulla, sit amet scelerisque orci. Nullam consectetur tortor erat, a pulvinar augue egestas ultricies. Integer ut tempor nibh.
  </p>

  <!-- tool bar -->

  <div class="widget-tools row mt-4">
    <div class="col text-secondary widget-toolbar">
      <div class="widget-group widget-comments d-inline-block">
        <svg class="lexicon-icon lexicon-icon-thumbs-up" viewBox="0 0 512 512">
            <path class="lexicon-icon-body" fill="none" d="M503.3,185.2c-4.5-8.3-13.4-19.1-30.5-23.1c-8.1-1.9-16.2-1.9-24.8-1.9L339.8,160c4-9.1,7.6-18.6,10.7-29.4
              c14.7-40.9,13.3-77-4.1-102C333.5,10.2,313.1,0,288.9,0c-0.5,0-0.9,0-1.4,0l-0.2,0c-24,0.5-47.3,15.7-69.2,45.1
              c-12.6,16.8-21.2,33.5-22.6,36.4L138.1,192H96v320l215.8,0c21.8,0,54-12.5,80-31.1c36.2-25.9,56.1-60.3,56.1-96.9v-36
              c7.7-2.1,15.6-5.3,23.3-10.1c18.6-11.5,40.7-35,40.7-82C512,218,511.2,199.9,503.3,185.2z"></path>
            <path class="lexicon-icon-outline" d="M503.3,185.2c-4.5-8.3-13.4-19.1-30.5-23.1c-8.1-1.9-16.2-1.9-24.8-1.9L339.8,160c4-9.1,7.6-18.6,10.7-29.4
              c14.7-40.9,13.3-77-4.1-102C333.5,10.2,313.1,0,288.9,0c-0.5,0-0.9,0-1.4,0l-0.2,0c-24,0.5-47.3,15.7-69.2,45.1
              c-12.6,16.8-21.2,33.5-22.6,36.4L138.1,192H96v320l215.8,0c21.8,0,54-12.5,80-31.1c36.2-25.9,56.1-60.3,56.1-96.9v-36
              c7.7-2.1,15.6-5.3,23.3-10.1c18.6-11.5,40.7-35,40.7-82C512,218,511.2,199.9,503.3,185.2z M418.1,288c-0.6,0-1,0-1.4,0l-32.6-0.7
              V384c0,19.4-15.5,34.8-28.6,44.3c-18.6,13.5-38.5,19.5-43.7,19.7H160V256h17l75.4-145.3l0.3-0.6c0.1-0.1,5.8-11.7,14.6-24
              c11.3-15.8,19.4-21.2,21.9-22.2c3.8,0.1,4.4,1,4.7,1.3c3.3,4.7,4.9,20.4-4,44.5l-0.5,1.3l-0.4,1.3c-4.5,16.5-11.3,29.5-20.6,47.4
              c-2.9,5.6-5.9,11.3-9.1,17.8L236.1,224l211.3,0.1c0.6,10.1,0.6,24.4,0.6,31.9C448,275.2,442.9,288,418.1,288z"></path>
            <path class="lexicon-icon-outline" d="M32,192c-17.7,0-32,14.3-32,32v256c0,17.7,14.3,32,32,32s32-14.3,32-32V224C64,206.3,49.7,192,32,192z"></path>
            </svg>
        <span class="ml-1">18</span>
      </div>
      
      <div class="widget-group widget-likes d-inline-block">
        <svg class="lexicon-icon lexicon-icon-thumbs-up" viewBox="0 0 512 512">
            <path class="lexicon-icon-body" fill="none" d="M503.3,185.2c-4.5-8.3-13.4-19.1-30.5-23.1c-8.1-1.9-16.2-1.9-24.8-1.9L339.8,160c4-9.1,7.6-18.6,10.7-29.4
              c14.7-40.9,13.3-77-4.1-102C333.5,10.2,313.1,0,288.9,0c-0.5,0-0.9,0-1.4,0l-0.2,0c-24,0.5-47.3,15.7-69.2,45.1
              c-12.6,16.8-21.2,33.5-22.6,36.4L138.1,192H96v320l215.8,0c21.8,0,54-12.5,80-31.1c36.2-25.9,56.1-60.3,56.1-96.9v-36
              c7.7-2.1,15.6-5.3,23.3-10.1c18.6-11.5,40.7-35,40.7-82C512,218,511.2,199.9,503.3,185.2z"></path>
            <path class="lexicon-icon-outline" d="M503.3,185.2c-4.5-8.3-13.4-19.1-30.5-23.1c-8.1-1.9-16.2-1.9-24.8-1.9L339.8,160c4-9.1,7.6-18.6,10.7-29.4
              c14.7-40.9,13.3-77-4.1-102C333.5,10.2,313.1,0,288.9,0c-0.5,0-0.9,0-1.4,0l-0.2,0c-24,0.5-47.3,15.7-69.2,45.1
              c-12.6,16.8-21.2,33.5-22.6,36.4L138.1,192H96v320l215.8,0c21.8,0,54-12.5,80-31.1c36.2-25.9,56.1-60.3,56.1-96.9v-36
              c7.7-2.1,15.6-5.3,23.3-10.1c18.6-11.5,40.7-35,40.7-82C512,218,511.2,199.9,503.3,185.2z M418.1,288c-0.6,0-1,0-1.4,0l-32.6-0.7
              V384c0,19.4-15.5,34.8-28.6,44.3c-18.6,13.5-38.5,19.5-43.7,19.7H160V256h17l75.4-145.3l0.3-0.6c0.1-0.1,5.8-11.7,14.6-24
              c11.3-15.8,19.4-21.2,21.9-22.2c3.8,0.1,4.4,1,4.7,1.3c3.3,4.7,4.9,20.4-4,44.5l-0.5,1.3l-0.4,1.3c-4.5,16.5-11.3,29.5-20.6,47.4
              c-2.9,5.6-5.9,11.3-9.1,17.8L236.1,224l211.3,0.1c0.6,10.1,0.6,24.4,0.6,31.9C448,275.2,442.9,288,418.1,288z"></path>
            <path class="lexicon-icon-outline" d="M32,192c-17.7,0-32,14.3-32,32v256c0,17.7,14.3,32,32,32s32-14.3,32-32V224C64,206.3,49.7,192,32,192z"></path>
            </svg>
        <span class="ml-1">32</span>
      </div>
       <div class="widget-group widget-read-time d-inline-block">
        <svg class="lexicon-icon lexicon-icon-thumbs-up" viewBox="0 0 512 512">
            <path class="lexicon-icon-body" fill="none" d="M503.3,185.2c-4.5-8.3-13.4-19.1-30.5-23.1c-8.1-1.9-16.2-1.9-24.8-1.9L339.8,160c4-9.1,7.6-18.6,10.7-29.4
              c14.7-40.9,13.3-77-4.1-102C333.5,10.2,313.1,0,288.9,0c-0.5,0-0.9,0-1.4,0l-0.2,0c-24,0.5-47.3,15.7-69.2,45.1
              c-12.6,16.8-21.2,33.5-22.6,36.4L138.1,192H96v320l215.8,0c21.8,0,54-12.5,80-31.1c36.2-25.9,56.1-60.3,56.1-96.9v-36
              c7.7-2.1,15.6-5.3,23.3-10.1c18.6-11.5,40.7-35,40.7-82C512,218,511.2,199.9,503.3,185.2z"></path>
            <path class="lexicon-icon-outline" d="M503.3,185.2c-4.5-8.3-13.4-19.1-30.5-23.1c-8.1-1.9-16.2-1.9-24.8-1.9L339.8,160c4-9.1,7.6-18.6,10.7-29.4
              c14.7-40.9,13.3-77-4.1-102C333.5,10.2,313.1,0,288.9,0c-0.5,0-0.9,0-1.4,0l-0.2,0c-24,0.5-47.3,15.7-69.2,45.1
              c-12.6,16.8-21.2,33.5-22.6,36.4L138.1,192H96v320l215.8,0c21.8,0,54-12.5,80-31.1c36.2-25.9,56.1-60.3,56.1-96.9v-36
              c7.7-2.1,15.6-5.3,23.3-10.1c18.6-11.5,40.7-35,40.7-82C512,218,511.2,199.9,503.3,185.2z M418.1,288c-0.6,0-1,0-1.4,0l-32.6-0.7
              V384c0,19.4-15.5,34.8-28.6,44.3c-18.6,13.5-38.5,19.5-43.7,19.7H160V256h17l75.4-145.3l0.3-0.6c0.1-0.1,5.8-11.7,14.6-24
              c11.3-15.8,19.4-21.2,21.9-22.2c3.8,0.1,4.4,1,4.7,1.3c3.3,4.7,4.9,20.4-4,44.5l-0.5,1.3l-0.4,1.3c-4.5,16.5-11.3,29.5-20.6,47.4
              c-2.9,5.6-5.9,11.3-9.1,17.8L236.1,224l211.3,0.1c0.6,10.1,0.6,24.4,0.6,31.9C448,275.2,442.9,288,418.1,288z"></path>
            <path class="lexicon-icon-outline" d="M32,192c-17.7,0-32,14.3-32,32v256c0,17.7,14.3,32,32,32s32-14.3,32-32V224C64,206.3,49.7,192,32,192z"></path>
            </svg>
        <span class="ml-1">5 min</span>
      </div>
    </div>

    <div class="col widget-toolbar text-right">
      <button class="btn btn-outline-secondary btn-borderless btn-sm">
        <svg class="lexicon-icon lexicon-icon-share" viewBox="0 0 448 448">
          <path class="lexicon-icon-outline" d="M352,256c-25.8381,0-49.3213,10.2641-66.5961,26.9246l-94.1361-47.0682C191.7487,231.9703,192,228.014,192,224
            c0-4.0142-0.2514-7.9706-0.7322-11.8568l94.1359-47.0681C302.6784,181.7358,326.1617,192,352,192c52.9346,0,96-43.0654,96-96
            S404.9346,0,352,0s-96,43.0654-96,96c0,4.0143,0.2514,7.9707,0.7322,11.857l-94.136,47.0678C145.3215,138.2642,121.8382,128,96,128
            c-52.9346,0-96,43.0654-96,96s43.0654,96,96,96c25.838,0,49.3212-10.264,66.5959-26.9245l94.1362,47.068
            C256.2513,344.0297,256,347.9859,256,352c0,52.9346,43.0654,96,96,96s96-43.0654,96-96S404.9346,256,352,256z M352,64
            c17.6445,0,32,14.355,32,32s-14.3555,32-32,32s-32-14.355-32-32S334.3555,64,352,64z M96,256c-17.645,0-32-14.3555-32-32
            c0-17.645,14.355-32,32-32s32,14.355,32,32C128,241.6445,113.645,256,96,256z M352,384c-17.6445,0-32-14.3555-32-32
            s14.3555-32,32-32s32,14.3555,32,32S369.6445,384,352,384z"></path>
          </svg>
        Share
      </button>
    </div>
  </div>
  
  <div class="row widget-toolbar widget-toolbar-bottom pt-3">
        <div class="col-12 d-block">
          <div class="float-right text-right">
            <button class="btn btn-outline-primary btn-borderless btn-monospaced btn-sm">
              <svg class="lexicon-icon lexicon-icon-ellipsis-v" viewBox="0 0 512 512">
                <path class="lexicon-icon-outline" d="M319 255.5c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path><path class="lexicon-icon-outline" d="M319 448c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path><path class="lexicon-icon-outline" d="M319 64c0 35.346-28.654 64-64 64s-64-28.654-64-64c0-35.346 28.654-64 64-64s64 28.654 64 64z"></path>
              </svg>
            </button>
            <button class="btn btn-primary btn-sm">
              <svg class="lexicon-icon lexicon-icon-plus mr-1" viewBox="0 0 512 512">
                <path class="lexicon-icon-outline" d="M479.82 224.002h-192.41v-191.91c0-17.6-14.4-32-32-32v0c-17.6 0-32 14.4-32 32v191.91h-191.41c-17.6 0-32 14.4-32 32v0c0 17.6 14.4 32 32 32h191.41v191.91c0 17.6 14.4 32 32 32v0c17.6 0 32-14.4 32-32v-191.909h192.41c17.6 0 32-14.4 32-32v0c0-17.6-14.4-32-32-32z"></path>
              </svg>
              Admin button
          </button>
          </div>
        </div>
      </div>
</div>

<!-- NORMAL BEHAVIOR WITH BOOTSTRAP 4 COLS 

<div class="portlet container card">
  <div class="row widget-title">
      <div class="col-md text-secondary">
        NORMAL BEHAVIOR WITH BOOTSTRAP 4 COLS, NORMAL BEHAVIOR WITH BOOTSTRAP 4 COLS
      </div>

      <div class="col-md-auto text-right">
        <button class="btn btn-secondary btn-borderless btn-sm">Tool action</button>
        <button class="btn btn-outline-primary btn-borderless btn-sm">Secondary Admin Action</button>
        <button class="btn btn-outline-primary btn-sm">Primary Admin Action</button>
      </div>
  </div>
</div>

-->
              
            
!

CSS

              
                @import "https://pat270.github.io/lexicon/css/site/site-atlas-font-awesome.css";

.widget-toolbar {
  .btn + .btn, .widget-group + .widget-group  {
    margin-left: 1rem;
  }
}

.btn-borderless {
  border-color: transparent;
  
  &:hover, &:active, &:focus {
    border-color: transparent;
  }
}



// No needed code
.portlet {
  padding: 24px;
}
//
              
            
!

JS

              
                var clayURL = "";
var bootstrap4URL = "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css";

var changeButton = $(".changeBS");

loadCSS = function(url) {
  if (!$('link[href="' + url + '"]').length)
    $('link[rel=stylesheet]').remove();
    $('head').append('<link rel="stylesheet" type="text/css" href="' + url + '">');
}

changeButton.click(function(){
  var texti = $(this).text();
  if (texti == "Load bootstrap 4") {
     loadCSS(bootstrap4URL);
     $(this).text("Load Clay");
  } else {
    loadCSS(clayURL);
     $(this).text("Load bootstrap 4");
  } 
});
              
            
!
999px

Console