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

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="stuffonshelf"> <!--This is the div that contains everything you want to put on the shelf. -->
  <div class="example">heehee</div> <!-- Don't worry about these, they're just examples of things you can put on the shelves -->
  <div class="example">hoohoo</div>
  <div class="example">haha</div>
</div>
<img class="shelf"> <!-- This is the shelf itself, you don't need to specify a src because the CSS takes care of that -->

<br>

<div class="stuffonshelf">
  <div class="example2">bada bing</div> <!-- Shows how it works with differing heights -->
  <div class="example">bada boom</div>
  <div class="example">fuggedabaoutit</div>
</div>
<img class="shelf">

<br>

<div class="stuffonshelf">
  <div class="example">bada bing</div>
  <img src="https://melonking.net/webgarden/tumblr_nfv4336ffD1tsxfu3o1_500.png"> <!-- It works with images too! If your image has empty space at the bottom, you might wanna crop it though (or at least give it a custom negative margin) -->
  <div class="example2">fuggedabaoutit</div>
</div>
<img class="shelf">
              
            
!

CSS

              
                .shelf {
  display: block;
  z-index: 9;
  content: url("https://i.imgur.com/1QepZRl.png");
  position: relative;
  width: 941px;
  height: 175px;
  margin-left: auto;
  margin-right: auto;
}

.stuffonshelf {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 10;
  margin-bottom: -80px; /* This is what actually puts the stuff ON the shelf instead of hovering above it */
  width: 770px;
  margin-left: auto;
  margin-right: auto;
}

.example { /* Of course, you can delete this */
  width: 200px;
  height: 200px;
  padding: 5px;
  background-color: magenta;
}

.example2 { /* Of course, you can delete this */
  width: 200px;
  height: 300px;
  padding: 5px;
  background-color: magenta;
}
              
            
!

JS

              
                /* Guess what? None here! */
              
            
!
999px

Console