Pen Settings



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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <script src=""></script>
<script src=""></script>
<div class="draggable-parent">
  <div class="resizable-content">
    <h3 class="draggable-handle">Draggable &amp; Collapsable <a href="#" class="min-max"></a></h3>
    <div class="real-content">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.<br />Fugit corrupti quae quia, perferendis porro voluptas itaque<br />recusandae facilis numquam, eius expedita hic minima<br />accusamus consequuntur voluptate!</p>



                * {
  font-family: 'Open Sans';
  font-size: 10pt;
  line-height: 1;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

.draggable-parent {
  border: 2px solid #3c3c3c;
  display: inline-block;
  position: fixed;
  border-radius: 4px;
  -moz-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  -o-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  right: 10px;
  bottom: 10px;

.draggable-parent .resizable-content {
  min-height: 50px;
  min-width: 100px;
  padding-bottom: 20px;
  height: auto !important; /* For making sure no whitespace outside. */

.draggable-parent .resizable-content .draggable-handle {
  background-color: #3c3c3c;
  color: #fff;
  font-size: 12.5px;
  padding: 5px;
  cursor: move;
  margin: 0;
  position: relative;
  padding-right: 25px;

.ui-draggable-dragging {
  opacity: 0.75;

.min-max {
  position: absolute;
  width: 14px;
  height: 14px;
  background: url("") -1px -1px #fff;
  top: 50%;
  right: 3px;
  margin-top: -8px;
  border-radius: 4px;

.min-max.max {
  background-image: url("");

.real-content {
  background-color: #f90;
  padding: 15px;


                $(function() {
    handle: ".draggable-handle",
    drag: function( event, ui ) {
        "right": "auto",
        "bottom": "auto"
    stop: function (event, ui) {
        "right": ($(window).width() - ($(this).offset().left + $(this).outerWidth())),
        "bottom": ($(window).height() - ($(this).offset().top + $(this).outerHeight())),
        "left": "auto",
        "top": "auto"
  $(".draggable-parent .resizable-content").resizable({
    minHeight: 100,
    minWidth: 100,
    handles: "se"
  $(".min-max").click(function(e) {