Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <html>
<head>
    <title>SideBar Menu</title>
</head>

<body>
    <div class="sidebar">
        <img alt="logo" height="200" src=
        "http://icons.iconarchive.com/icons/visualpharm/icons8-metro-style/512/Plants-Trees-Leaf-icon.png"
        width="200">

        <ul>
            <li class="listItemA"><a href="#"><img alt="icon" height="40" src=
            "http://www.iconsdb.com/icons/preview/black/circle-xxl.png" width=
            "40">HOME</a></li>

            <li class="listItemT" style="left:0px; background:none;">
            PROJECTS</li>

            <li class="listItemA"><a href="#"><img alt="icon" height="40" src=
            "http://www.iconsdb.com/icons/preview/black/circle-xxl.png" width=
            "40">BEGINNER</a></li>

            <li class="listItemA"><a href="#"><img alt="icon" height="40" src=
            "http://www.iconsdb.com/icons/preview/black/circle-xxl.png" width=
            "40">ELEMENTS</a></li>

            <li class="listItemA"><a href="#"><img alt="icon" height="40" src=
            "http://www.iconsdb.com/icons/preview/black/circle-xxl.png" width=
            "40">GAMES</a></li>

            <li class="listItemA"><a href="#"><img alt="icon" height="40" src=
            "http://www.iconsdb.com/icons/preview/black/circle-xxl.png" width=
            "40">PAGES</a></li>
        </ul>
    </div>
</body>
</html>
              
            
!

CSS

              
                /* GENERAL */
body {
    margin: 0;
}

/*SIDEBAR*/
.sidebar {
    position: absolute;
/* Change :absolute; to :fixed; to keep the sidebar in place when scolling. */
    background: #c1c1c1;
/* Sidebar Background */
    width: 200px;
/* Width of side bar. WARNING: If you change this, change .listItemA:width */
    height: 100%;
    padding-top: 10px;
/* Padding above the sidebar image. */
    font-family: helvetica;
/* Font for the sidebar (Remove to keep the same font as the rest of the document) */
}

.sidebar a {
    text-decoration: none;
/* Removes the underline from links. */
    color: #e9e7e7;
/* Text color of the menu items */
}

.sidebar img {
    margin-right: auto;
    margin-left: auto;
    vertical-align: middle;
    margin-top: -2px;
    margin-right: 20px;
}

.sidebar ul {
    line-height: 40px;
    overflow: hidden;
    margin-left: 0;
    padding-left: 0;
}

.sidebar ul li {
    list-style-type: none;
    background: #FF712C;
/* Background colour of the menu items. */
    color: #695D46;
/* Text colour of the side bar titles. (Not the links). */
}

.listItemA {
    height: 40px;
    width: 240px;
/* Alter this to be the .sidebar:width PLUS 40 */
    transition: .3s;
/* Speed of the hover animation */
    position: relative;
    left: -40px;
}

.listItemA:hover {
    left: 0;
}

.listItemT {
    text-align: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console