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.


<div class="grid">
        <h2>Sidebar Full of Dreams</h2>
        <input id="fixed" type="checkbox">
        <label for="fixed">Make it fixed</label><br>
        <input id="absolute" type="checkbox">
        <label for="absolute">Make it absolute</label><br>
        <input id="sticky" type="checkbox">
        <label for="sticky">Make it sticky (doesn’t work)</label>
        <h1>Gridelicous Grids</h1>
        <p>Main content for the gods!</p>
<footer>Code by <a href="">Zoë Bijl</a></footer>


                .grid {
    display: grid;
    grid-template-columns: 290px auto;

aside {
    background: pink;

aside.fixed {
    position: fixed;

aside.sticky {
    position: sticky;
    top: 10px;

aside.absolute {
    position: absolute;

main {
    height: 500px;

// Additional fluff
header {
    padding: 0 0 1em;
    border-bottom: .25em solid purple;
    p {
        display: inline-block;
        margin: 0;
        padding: 0 .25em;
        border: 1px solid purple;
        font-size: 2em;
        font-weight: 600;
        background: repeating-linear-gradient(transparent 0px, transparent 9px, #888 10px),
            repeating-linear-gradient(90deg, transparent 0px, transparent 9px, #888 10px);

main {
    padding: .5em 1em;

footer {
    margin-top: 0;

h2 {
    font-size: 1.25em;

label:active {
    user-select: none;


                let fixed = document.getElementById('fixed')
fixed.addEventListener('change', () => {
    if (fixed.checked === true) {
    } else {

let sticky = document.getElementById('sticky')
sticky.addEventListener('change', () => {
    if (sticky.checked === true) {
    } else {

let absolute = document.getElementById('absolute')
absolute.addEventListener('change', () => {
    if (absolute.checked === true) {
    } else {