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

              
                	<input type="checkbox" id="responsive-nav">
<label for="responsive-nav" class="responsive-nav-label"><span>&#9776;</span> Navigation</label>

<nav>
  <ul>
    <li><a href="#" title="Nach Hause">Home</a></li>
    <li class="submenu"><a href="#" title="Unser Produktsortiment">Produkte</a>
      <ul>
        <li class="submenu"><a href="#" title="Unser Obstsortiment">Obst</a>
          <ul>
            <li><a href="#" title="Unsere Ananasauswahl">Ananas</a></li>
            <li><a href="#" title="Unsere Apfelauswahl">Äpfel</a></li>
            <li><a href="#" title="Unsere Birnenauswahl">Birnen</a></li>
            <li><a href="#" title="Unsere Bananenauswahl">Bananen</a></li>
          </ul>
        </li>
        <li class="submenu"><a href="#" title="Unser Gemüse">Gemüse</a>
          <ul>
            <li><a href="#" title="Unsere Kartoffelauswahl">Kartoffeln</a></li>
            <li><a href="#" title="Unsere Salatauswahl">Salat</a></li>
            <li class="submenu"><a href="#" title="Unser Rübensortiment">Rüben</a>
              <ul>
                <li class="submenu"><a href="#" title="Unsere Mohrrüben">Mohrrüben</a>
                  <ul>
                    <li><a href="#" title="frisch vom Feld">frisch</a></li>
                    <li><a href="#" title="aus dem Lager">nicht so frisch</a></li>
                  </ul>
                </li>
                <li><a href="#" title="Unsere Steckrüben">Steckrüben</a></li>
              </ul>
            </li>
          </ul>
        </li>
      </ul>
    </li>
    <li><a href="#" title="Das sind wir">Über uns</a></li>
    <li><a href="#" title="So erreichen Sie uns">Kontakt</a></li>
    <li><a href="#" title="Rechtliches">Impressum</a></li>
  </ul>
</nav>
              
            
!

CSS

              
                body {
  background: orange;
}

* {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  box-sizing: border-box;
}

/* hide the checkbox and the label */

input#responsive-nav,
label.responsive-nav-label {
  display: none;
}

/* declarations for the not-responsove-menu */

nav {
  float: left;
  width: 100%;
  background: #3a3a3a;
  font-size: 16px;
}

nav ul {
  margin: 0;
  padding: 0;
}

nav a {
  display: block;
  color: #fff;
  text-decoration: none;
}

nav ul li {
  position: relative;
  float: left;
  list-style: none;
  color: #fff;
  transition: 0.5s;
}

nav ul li a {
  padding: 20px;
}

nav ul > li.submenu > a:after {
  position: relative;
  float: right;
  content: '';
  margin-left: 10px;
  margin-top: 5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #fff;
  border-bottom: 5px solid transparent;
}

nav ul ul li.submenu > a:after {
  margin-left: auto;
  margin-right: -10px;
  border-left: 5px solid #fff;
  border-right: 5px solid transparent;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

nav ul li:hover {
  background: #4096ee;
}

nav ul ul {
  position: absolute;
  top: -9999px;
  left: -9999px;
  background: #333;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

nav ul ul li {
  float: none;
  width: 200px;
  border-bottom: 1px solid #555;
}

nav ul ul li a {
  padding: 10px 20px;
}

nav ul ul li:last-child {
  border-bottom: none;
}

nav ul li:hover > ul {
  top: 100%;
  left: 0;
}

nav ul ul li:hover > ul {
  top: 0;
  left: 200px;
}

/* Declarations for the responsive menu */

@media screen and (max-width: 1680px) {
  
* {
  font-size: 18px;
}
  
label.responsive-nav-label {
	position: relative;
  display: block;
  padding: 20px;
  background: #222;
  cursor: pointer;
  color: #fff;
}
  
label.responsive-nav-label span {
  margin-right: 10px;  
}

nav {
  position: absolute;
  top: -9999px;
  padding: 10px;
}

input#responsive-nav[type=checkbox]:checked ~ nav {
  position: relative;
  top: 0;
}

nav a:after {
  display: none;
}

nav li {
  float: none !important;
  width: 100% !important;
  border-bottom: none !important; 
}
  
nav li a {
  margin-bottom: 10px !important;
  padding: 10px 20px !important; 
  background: #4a4a4a;
}
  
nav ul li:hover {
  background: none;
}
  
nav ul li a:hover {
  background: #4096ee;
}
  
nav ul ul {
  position: relative !important;
  width: 100%;
  left: 0 !important;
  top: 0 !important;
  background: none !important;
  box-shadow: none;
}
  
nav ul ul li {
  padding-left: 20px;
}

}
              
            
!

JS

              
                
              
            
!
999px

Console