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

              
                <!-- Read the full post at https://jen4web.substack.com/css-dropdowns -->

<div class="container">
  <h1>Day 14: CSS Only Dropdown Menu Challenge</h1>

  <h2>INSTRUCTIONS:</h2>
  <ol class="instructions">
    <li>Fork this CodePen</li>
    <li>Copy and paste in your HTML and CSS from Day 13.<br><small>You're almost there &mdash; make it 3 out of 3 today! Tomorrow we wrap up with a focus our foot(er)work.</small></li>
    <li>Under Settings > Pen Settings > CSS remember to add your CDN link for Font Awesome.</li>
    <li>Choose one of your menu items to have a dropdown.</li>
    <li>If you are using the martial arts / Bruce Lee themed navbar, some dropdown menu item possibilities are listed below.</li>
  </ol> 
  <h3>Make it easier</h3>
  <p>Use one of the non-responsive navbars we created earlier, either from an example CodePen or one you created yourself, and add a dropdown menu to it.</p> 

  <h3>Tips from Erika</h3>
  <ul class="tips">
    <li>Are you ready for the boss round? šŸ’Ŗ This kind of coding is best done incrementally. Pace yourself! Follow along step-by-step with the directions and example today, and don't forget to breathe. šŸ˜…</li>
  </ul>

  <p><a href="https://jen4web.substack.com/p/css-dropdowns-discussion" target="_blank" class="button">Share your answer on Substack</a></p>
</div>

<hr><!-- Mess with anything below this line or in the CSS column! -->

<nav>
  <ul>
    <li><a href="#"><img class="logo" src="https://assets.codepen.io/3273620/martial-arts-logo.png" alt="Logo - Click for Home"></a></li>
    <li><a href="#">Jeet Kun Do</a></li>
<!--  Possible submenu items  -->
    History & Philosophy
    Principles
    Practitioners
    JKD Today
    <li><a href="#">Wing Chun</a></li>
    <li><a href="#">Filipino Martial Arts</a></li>
    <li><a href="#">Majapahit Silat</a></li>
    <li><a href="#">Brazilian Jiu-Jitsu</a></li>
    <li><a href="#">Thai Boxing</a></li>
  </ul>
</nav>


              
            
!

CSS

              
                .logo {
  width: 125px;
}







/* default styling for the page & instructions - you don't need to touch this unless you really want to */
html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}
body {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.2rem;
  padding-bottom: 5.0em;
}
.container {
  background-color: rgba(255,255,255,0.8); 
  width: 90%;
  padding: 0.5rem 1.5rem 0;
}
h1 {
  margin-top: 50px;
}
.instructions li {
  padding-bottom: 1.0rem;
}
.tips li {
  padding-bottom: 1.0rem;
  font-size: smaller;
}
.button {
  background-color: #eb3b5a;
  padding: 0.5rem 1rem;
  border: 1px solid #eb3b5a;
  border-radius: 30px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin: 1em 0 5rem;
  transition: all 1s ease;
}
.button:hover {
  color: #eb3b5a;
  background-color: white;
}
              
            
!

JS

              
                /* 

šŸ’Æ This challenge is certified 90% free of JavaScript. 

ALL THE GOOD STUFF IS IN THE HTML AND CSS BLOCKS :-D

*/
              
            
!
999px

Console