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 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.

Quick-add: + add another resource

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.

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.

              <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam aut odit libero commodi, reiciendis iure magnam modi tempore. Repellendus, voluptas! Sunt magnam iusto, nam cum pariatur molestiae ipsam harum aperiam.</p>

<p data-height="537" data-theme-id="1" data-slug-hash="RNLdpz" data-default-tab="result" data-user="osublake" data-embed-version="2" data-pen-title="Sortable Grid Using GreenSock Draggable" class="codepen">See the Pen <a href="https://codepen.io/osublake/pen/RNLdpz/">Sortable Grid Using GreenSock Draggable</a> by Blake Bowen (<a href="https://codepen.io/osublake">@osublake</a>) on <a href="https://codepen.io">CodePen</a>.</p>
<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>

<p>Alias maxime, accusamus amet quos aliquid non obcaecati aliquam quidem quod cumque accusantium! In voluptates, similique nihil consequuntur sequi nobis eaque quam praesentium quasi, laboriosam, provident minus molestiae est inventore.</p>
              .cp_embed_wrapper {
  position: relative;
  margin: 0 0 1rem 0;
  &.dragging {
    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 4000;
  .cp_embed_iframe {
    display: block;
.win-size-grip {
   position: absolute;
   width: 16px;
   height: 16px;
   padding: 4px;
   bottom: 0;
   right: 0;
   z-index: 5000;
   cursor: nwse-resize;
   background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/wingrip.png) no-repeat;

body {
  max-width: 780px;
  padding: 10px;
  margin: 0 auto;
  font: 22px/1.5 sans-serif;
              // This is the callback from CodePen's embed script, ei.js
function __CodePenIFrameAddedToPage() {

function makeEmbedsResizeable() {
  // You don't have to set min and max, but it's kinda useful so that users don't drag them to a weird/bad size.
  var maxWidth = 1000; // calculated below
  var minWidth = 320;
  var minHeight = 150; 
  $(".cp_embed_wrapper").each(function() {
    var $wrapper = $(this);
    var $iframe = $wrapper.find("iframe");
    $wrapper.append("<div class='win-size-grip'></div>");
    var originalHeight = $iframe.outerHeight();
    $wrapper.css("height", originalHeight);
    // Can't set this in CSS, otherwise height measurement will be wrong
    $iframe.css("height", "100%");
      handleSelector: "> .win-size-grip",
      onDragStart: function (e, $el, opt) {
        maxWidth = window.outerWidth;
      onDragEnd: function (e, $el, opt) {
      onDrag: function (e, $el, newWidth, newHeight, opt) {
        if (newWidth > maxWidth) {
          newWidth = maxWidth;
        if (newWidth < minWidth) {
          newWidth = minWidth;
        if (newHeight < minHeight) {
          newHeight = minHeight;
        return false;

Loading ..................