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/p/responsive-navbars -->

<div class="container">
  <h1>Day 12: Responsive Navbar Challenge</h1>

  <h2>INSTRUCTIONS:</h2>
  <ol class="instructions">
    <li>Fork this CodePen</li>
    <li>Create a responsive navbar using either the mobile- or desktop- first models</li>
    <li>Include at least one media query</li>
    <li>Feel free to incorporate icons if you want!</li>
  </ol>

  <h3>Tips from Erika</h3>
  <ul class="tips">
    <li>Responsive web design means learning to make your code and designs adaptable - <a href="https://medium.com/change-your-mind/what-did-bruce-lee-mean-when-he-said-be-like-water-my-friend-29f0a476a32c">As Bruce Lee once said, "Be water, my friend."</a></li>
  </ul>

  <p><a href="https://jen4web.substack.com/p/responsive-navbars-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>
    <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