Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource


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


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.


Auto Save

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.


                <input type="checkbox" id="checkbox">
<label class="btn" for="checkbox"><i class="fa fa-bars"></i> <span>Menu</span></label>

<div class="sidebar">
        <a href="#"><li><i class="fa fa-tachometer"></i>Dashboard</li></a>
        <a href="#"><li><i class="fa fa-lightbulb-o"></i>Widgets</li></a>
        <a href="#" class="active"><li><i class="fa fa-line-chart"></i>Charts</li></a>
        <a href="#"><li><i class="fa fa-television"></i>Front-End</li></a>
        <a href="#"><li><i class="fa fa-send"></i>Email</li></a>
        <a href="#"><li><i class="fa fa-wpforms"></i>Forms</li></a>
        <a href="#"><li><i class="fa fa-paint-brush"></i>UI Elements</li></a>
        <a href="#"><li><i class="fa fa-file-text-o"></i>Pages</li></a>
        <a href="#"><li><i class="fa fa-globe"></i>Google Maps</li></a>


                @import url(;

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;

body {
    background-color: #f5f5f5;

#checkbox, .btn span { /* Hide the checkbox input & word "Menu" in the button */
    display: none;

/* Menu button - starts */
.btn {
    display: block;
    background-color: #247D9E;
    color: #fff;
    width: 55px;
    height: 50px;
    line-height: 50px;
    padding: 0 20px;
    cursor: pointer;
    transition: width .3s ease-in-out;
/* Menu button - ends */

/* Sidebar - starts */
.sidebar {
    background-color: #2B2E33;
    position: fixed;
    width: 250px;
    height: 100%;
    z-index: 1111;
    transition: transform .3s ease-in-out;
    transform: translateX(-250px);

.sidebar ul {
    padding: 0;
    margin: 0;
    list-style-type: none;

.sidebar ul a {
    position: relative;
    text-decoration: none;
    display: block;
    background-color: transparent;
    color: #BAB5BD;
    padding: 15px 20px;
    font-size: 16px;

.sidebar ul a li i {
    margin-right: 15px;

/* Add the word "New" to the second item and "2" to the third item */
.sidebar ul a:nth-child(2)::after, .sidebar ul a:nth-child(3)::after {
    position: absolute;
    top: 50%;
    right: 15px;
    margin-top: -9px;
    color: #fff;
    font-size: 13px;
    padding: 0 7px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;

.sidebar ul a:nth-child(2)::after {
    content: "New";
    background-color: tomato;

.sidebar ul a:nth-child(3)::after {
    content: "2";
    background-color: #247D9E;

/* Add margin to the icon in the second item */
.sidebar ul a:nth-child(2) li i {
    margin-left: 4px;
    margin-right: 19px;

.sidebar ul a:hover, .sidebar ul {
    background-color: #161920;
    color: #fff;

.sidebar ul a:hover::before, .sidebar ul {
    position: absolute;
    top: 0;
    left: 0;
    content: "";
    background-color: #247D9E;
    width: 4px;
    height: 100%;
/* Sidebar - ends */

/* Effect of showing the sidebar - starts */
#checkbox:checked ~ .sidebar {
    transform: translateX(0);

#checkbox:checked + .btn {
    width: 250px;
    padding: 0 20px;

#checkbox:checked + .btn span { /* Show again the word "Menu" in the button */
    display: inline;
/* Effect of showing the sidebar - ends */