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

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

              
                <!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Documentation</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link href="https://fonts.googleapis.com/css?family=Dosis&display=swap" rel="stylesheet"> 
    <link rel='stylesheet' type='text/css' media='screen' href='style.css'>    
    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</head>
<body>   
    <nav id="navbar">
        <header>Amazing documentation</header>
        <ul>
            <li><a class="nav-link" href="#Title_1">Title 1</a></li>
            <li><a class="nav-link" href="#Title_2">Title 2</a></li>
            <li><a class="nav-link" href="#Title_3">Title 3</a></li>
            <li><a class="nav-link" href="#Title_4">Title 4</a></li>
            <li><a class="nav-link" href="#Title_5">Title 5</a></li>
        </ul>
    </nav>
    <main id="main-doc">
        <section id="Title_1" class="main-section">
            <header>Title 1</header>
            <p>Aenean dolor arcu, porta pretium consequat eu, viverra a tortor. Quisque iaculis lectus a dictum imperdiet. Sed dignissim vestibulum elementum. Ut rhoncus elementum ipsum eget lobortis. Sed sapien enim, bibendum ac rhoncus a, ornare at dolor. Aenean non fermentum massa, vel suscipit elit. Cras aliquet erat rhoncus augue lacinia, at sollicitudin nunc mattis. </p>
            <p>Aenean dolor arcu, porta pretium consequat eu, viverra a tortor. Quisque iaculis lectus a dictum imperdiet. Sed dignissim vestibulum elementum. Ut rhoncus elementum ipsum eget lobortis. Sed sapien enim, bibendum ac rhoncus a, ornare at dolor. Aenean non fermentum massa, vel suscipit elit. Cras aliquet erat rhoncus augue lacinia, at sollicitudin nunc mattis. </p>
            <code>function greetMe(yourName) { alert("Hello " + yourName); }
                    greetMe("World");</code>
            <ul>
                <li>Item 1</li>
                <li>Item 2 item 2</li>
            </ul>
            <p>Fusce bibendum velit ut magna lacinia tempus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent eleifend est eu ullamcorper iaculis. Vestibulum aliquam hendrerit lorem quis aliquam. Donec at porttitor tellus, id faucibus justo. Cras lobortis magna nec lorem pharetra imperdiet. Maecenas feugiat quis dolor eu rhoncus. Duis quis pharetra felis, id convallis magna. </p>
            <div class="gototop"><a href="#navbar">&uparrow; Top</a></div>
        </section>
        <section id="Title_2" class="main-section">
            <header>Title 2</header>
            <p>Aenean dolor arcu, porta pretium consequat eu, viverra a tortor. Quisque iaculis lectus a dictum imperdiet. Sed dignissim vestibulum elementum. Ut rhoncus elementum ipsum eget lobortis. Sed sapien enim, bibendum ac rhoncus a, ornare at dolor. Aenean non fermentum massa, vel suscipit elit. Cras aliquet erat rhoncus augue lacinia, at sollicitudin nunc mattis. </p>
            <p>Fusce bibendum velit ut magna lacinia tempus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent eleifend est eu ullamcorper iaculis. Vestibulum aliquam hendrerit lorem quis aliquam. Donec at porttitor tellus, id faucibus justo. Cras lobortis magna nec lorem pharetra imperdiet. Maecenas feugiat quis dolor eu rhoncus. Duis quis pharetra felis, id convallis magna. </p>
            <code>function greetMe(yourName) { alert("Hello " + yourName); }
                    greetMe("World");</code>
                    <p>Aenean dolor arcu, porta pretium consequat eu, viverra a tortor. Quisque iaculis lectus a dictum imperdiet. Sed dignissim vestibulum elementum. Ut rhoncus elementum ipsum eget lobortis. Sed sapien enim, bibendum ac rhoncus a, ornare at dolor. Aenean non fermentum massa, vel suscipit elit. Cras aliquet erat rhoncus augue lacinia, at sollicitudin nunc mattis. </p>                    
            <div class="gototop"><a href="#navbar">&uparrow; Top</a></div>
        </section>
        <section id="Title_3" class="main-section">
            <header>Title 3</header>
            <ul>
                <li>Item 3</li>
                <li>Item 4 item 4</li>
            </ul>
            <p>Aenean dolor arcu, porta pretium consequat eu, viverra a tortor. Quisque iaculis lectus a dictum imperdiet. Sed dignissim vestibulum elementum. Ut rhoncus elementum ipsum eget lobortis. Sed sapien enim, bibendum ac rhoncus a, ornare at dolor. Aenean non fermentum massa, vel suscipit elit. Cras aliquet erat rhoncus augue lacinia, at sollicitudin nunc mattis. </p>
            <p>Fusce bibendum velit ut magna lacinia tempus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent eleifend est eu ullamcorper iaculis. Vestibulum aliquam hendrerit lorem quis aliquam. Donec at porttitor tellus, id faucibus justo. Cras lobortis magna nec lorem pharetra imperdiet. Maecenas feugiat quis dolor eu rhoncus. Duis quis pharetra felis, id convallis magna. </p>
            <code>function greetMe(yourName) { alert("Hello " + yourName); }
                    greetMe("World");</code>
                    <p>Aenean dolor arcu, porta pretium consequat eu, viverra a tortor. Quisque iaculis lectus a dictum imperdiet. Sed dignissim vestibulum elementum. Ut rhoncus elementum ipsum eget lobortis. Sed sapien enim, bibendum ac rhoncus a, ornare at dolor. Aenean non fermentum massa, vel suscipit elit. Cras aliquet erat rhoncus augue lacinia, at sollicitudin nunc mattis. </p>
            <div class="gototop"><a href="#navbar">&uparrow; Top</a></div>
        </section>
        <section id="Title_4" class="main-section">
            <header>Title 4</header>            
            <p>Aenean dolor arcu, porta pretium consequat eu, viverra a tortor. Quisque iaculis lectus a dictum imperdiet. Sed dignissim vestibulum elementum. Ut rhoncus elementum ipsum eget lobortis. Sed sapien enim, bibendum ac rhoncus a, ornare at dolor. Aenean non fermentum massa, vel suscipit elit. Cras aliquet erat rhoncus augue lacinia, at sollicitudin nunc mattis. </p>
            <code>function greetMe(yourName) { alert("Hello " + yourName); }
                    greetMe("World");</code>
            <p>Fusce bibendum velit ut magna lacinia tempus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent eleifend est eu ullamcorper iaculis. Vestibulum aliquam hendrerit lorem quis aliquam. Donec at porttitor tellus, id faucibus justo. Cras lobortis magna nec lorem pharetra imperdiet. Maecenas feugiat quis dolor eu rhoncus. Duis quis pharetra felis, id convallis magna. </p>
            <div class="gototop"><a href="#navbar">&uparrow; Top</a></div>
        </section>
        <section id="Title_5" class="main-section">
            <header>Title 5</header>
            <p>Aenean dolor arcu, porta pretium consequat eu, viverra a tortor. Quisque iaculis lectus a dictum imperdiet. Sed dignissim vestibulum elementum. Ut rhoncus elementum ipsum eget lobortis. Sed sapien enim, bibendum ac rhoncus a, ornare at dolor. Aenean non fermentum massa, vel suscipit elit. Cras aliquet erat rhoncus augue lacinia, at sollicitudin nunc mattis. </p>
            <code>function greetMe(yourName) { alert("Hello " + yourName); }
                    greetMe("World");</code>
            <p>Fusce bibendum velit ut magna lacinia tempus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent eleifend est eu ullamcorper iaculis. Vestibulum aliquam hendrerit lorem quis aliquam. Donec at porttitor tellus, id faucibus justo. Cras lobortis magna nec lorem pharetra imperdiet. Maecenas feugiat quis dolor eu rhoncus. Duis quis pharetra felis, id convallis magna. </p>
            <ul>
                <li>Item 5</li>
                <li>Item 6</li>
            </ul>
            <div class="gototop"><a href="#navbar">&uparrow; Top</a></div>
        </section>
    </main>
</body>
</html>








              
            
!

CSS

              
                body 
{
    font-family: 'Dosis', sans-serif;
    margin: 0px;
    padding:0px;    
}
#navbar
{    
    background: #E6DA8C;
    position: fixed;
    top:0px;
    left:0px;
    bottom:0px;
    width:300px;
    height: 100%;   
    box-shadow: 2px 0px 30px #8A7E30;  
}
#navbar ul
{
    margin:0px;
    padding:0px;
    list-style: none;   
}
#navbar ul li
{
    border-bottom: 1px dashed #D1732C;
}
#navbar li a
{  
    display:block;
    padding:10px;
    text-decoration:none;    
    color:#333;
}
#navbar li a:hover {
    animation-name: btn-animation;
    animation-duration: 1s; 
    animation-fill-mode: forwards;  
}
@keyframes btn-animation {
    100% {                
        color:#fff;        
    }
    100% {
        background-color:#8A7E30;
        color:#fff;        
    }
}

#navbar header
{
    display:block;
    background: #333;
    padding:10px;
    color:#ccc;
}
#main-doc
{
    background:#EBFBFA;
    margin-left: 300px;
    padding: 20px;
    margin-top:0px;
}
.main-section header
{    
    color:#D1732C;
    font-weight: bold;
}
.main-section
{
    color: #333;    
}
code
{     
    display: block;   
    padding:30px 10px;
    background:#F0DCB5;
}
.gototop 
{
    width: auto;
    display: block;
    margin: 20px 0px 40px 0px;
}
.gototop a
{
    text-decoration: none;
    background:#4EB9C2;
    color:#fff;
    padding:10px 20px;
    border-radius: 5px;
}
.gototop a:hover
{
    background:#8A7E30;
    color:#fff;
}

@media (max-width:800px) {
    #navbar {        
        position: inherit;
        top:0px;
        left:0px;
        right:0px;        
        width:auto;
        height: 200px;
        margin: 0px;
        padding:0px;
        overflow: scroll;
    }
    #main-doc {
        margin:0px;                
        padding:10px;                
    }
}


              
            
!

JS

              
                
              
            
!
999px

Console