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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<nav id="navbar" class="sidenav">
<!--   <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a> -->
  <header><h3>Learn all about CSS today</h3></header>
  <a href="#What_is_CSS" class="nav-link">What is CSS</a><br>
  <a href="#Show_me_an_example" class="nav-link">Show me an example</a><br>
  <a href="#Where_can_I_find_more_info" class="nav-link">Where can I find more info</a><br>
  <a href="#What_else" class="nav-link">What else</a><br>
  <a href="#History_of_CSS" class="nav-link">History of CSS</a>
</nav>

<main id = "main-doc">
<!-- All the main stuff:   -->
  
  <section class = "main-section" id = "What_is_CSS">
    <header><h2>What is CSS</h2></header>    
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris augue lectus, molestie ac urna eget, luctus fringilla odio. Donec sed iaculis purus. Phasellus ut diam venenatis, maximus est quis, suscipit mi. Ut sagittis purus a lorem vehicula, eu euismod mauris cursus.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris augue lectus, molestie ac urna eget, luctus fringilla odio. Donec sed iaculis purus. Phasellus ut diam venenatis, maximus est quis, suscipit mi. Ut sagittis purus a lorem vehicula, eu euismod mauris cursus.</p>
  </section>
  
  <section class = "main-section" id = "Show_me_an_example">
    <header><h2>Show me an example</h2></header>
    <p>Here is an example of some CSS code: <code>this here is compoooter code</code></p>
  </section>
  
  <section class = "main-section" id = "Where_can_I_find_more_info">
    <header><h2>Where can I find more info</h2></header>
    <p>Here are some more examples:
      <ul>
        <li><code>this here is compoooter code</code></li>
        <li><code>this here is compoooter code</code></li>
        <li><code>this here is compoooter code</code></li>
    </ul>    
    </p>
    <p>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer pharetra sed ligula ut mollis. Ut magna dui, porta non congue sed, pharetra non orci. Donec vitae euismod mauris. Duis sapien nulla, vestibulum a nulla in, lobortis dignissim velit.</p>
  </section>
  
  <section class = "main-section" id = "What_else">
    <header><h2>What else</h2></header>
    <p>Have you not had enough? Alright, alright, alright. Here's some more: 
      <ul>
        <li><code>umm - some more compooter code</code></li>
        <li><code>umm - some more compooter code</code></li>
    </ul>
        </p>
    <p>Aenean at ex elit. Aenean feugiat ornare ex, nec pulvinar justo elementum sit amet. Maecenas posuere eros quam, vel viverra tortor dapibus quis. Cras ut orci tortor. Aenean laoreet diam sit amet enim iaculis placerat.</p>
    <p>Aenean at ex elit. Aenean feugiat ornare ex, nec pulvinar justo elementum sit amet. Maecenas posuere eros quam, vel viverra tortor dapibus quis. Cras ut orci tortor. Aenean laoreet diam sit amet enim iaculis placerat.</p>
  </section>
  
  <section class = "main-section" id = "History_of_CSS">
    <header><h2>History of CSS</h2></header>
    <p>Donec magna elit, dignissim eget varius at, congue eu dolor. Praesent eu imperdiet ipsum. Etiam id condimentum lorem. Nam congue velit eros, eget consequat orci ultrices id. Integer quis dui sit amet dui malesuada rutrum. </p>
    <p>Donec magna elit, dignissim eget varius at, congue eu dolor. Praesent eu imperdiet ipsum. Etiam id condimentum lorem. Nam congue velit eros, eget consequat orci ultrices id. Integer quis dui sit amet dui malesuada rutrum. </p>
  </section>
  
  
  
</main>

              
            
!

CSS

              
                .sidenav {
  height: 100%;
  width: 200px;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  padding-top: 20px;
  color: white;
  font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

a {
  font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  color: white;
  font-size: 18px;
/*   padding-top: 30px; review this */
 }

#main-doc {
  margin-top: 50px;
  margin-left: 250px; /* Same as the width of the sidenav */
  width: 1000px;
}


.main-section {
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}

ul {
  list-style-type: none;
  width: 50%;
  margin: auto;
}

code{
  background-color: #f0f0f5;
}

@media max-device-width: 480px {
  .sidenav {
  height: 100%;
  width: 50px;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  padding-top: 20px;
  color: white;
  font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
  
  #main-doc {
  margin-top: 50px;
  margin-left: 55px; /* Same as the width of the sidenav */
  width: 100px;
}
  
}
              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console