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

              
                <div id="menu" class="menu">
  <ul id="css3menu" class="topmenu">
    <li class="topmenu_item" class="current_item"><a href="#!" >welkom</a></li>
    <li class="topmenu_item knop2"><a href="#!"><span>over</span></a>
    <ul class="knop2_list">
      <li><a href="#!">rutger</a></li>
      <li><a href="#!">rs-design</a></li>
      <li><a href="#!">referenties</a></li>
      <li><a href="#!">werk om niet</a></li>
    </ul></li>
    <li class="topmenu_item knop3"><a href="#!"><span>portfolio</span></a>
    <ul class="knop3_list">
      <li><a href="#!">boeken</a></li>
      <li><a href="#!">promotional</a></li>
      <li><a href="#!">logo's</a></li>
      <li><a href="#!">websites</a></li>
    </ul></li>
    <li class="topmenu_item knop4"><a href="#!"><span>contact</span></a>
    <ul class="knop4_list">
      <li><a href="#!">adres</a></li>
      <li><a href="#!">route</a></li>
      <li><a href="#!">credits - links</a></li>
    </ul></li>
  </ul>
</div>

              
            
!

CSS

              
                * {
  margin: 0;
  padding: 0;
  vertical-align: baseline;
  border: none;
  outline: none !important;
  /* outline: 1px dotted salmon; */
}
body {
  font: 100%/1.375 sans-serif;
}
.menu {
  position: relative;
  margin: 0;
  padding: 1em .5em 3em 1em;
  float: left;
  background: rgba(0,0,0,.75);
  border-right: 2px solid #666;
  }
.menu,
.topmenu,
.topmenu_item   {
  /* float: left; */
  display: block;
}
.topmenu,
.topmenu ul {
  list-style:none;
}
.topmenu {
  position:relative;
  display:block;
  width: 100%;
}
.topmenu_item {
  margin-top: 1em;
  z-index: 0;
}
.topmenu li {
  position:relative;
  display:block;
  white-space:nowrap;
  width: 110px;
  border-radius: 8px;
}
.topmenu ul li {
  /* float:none; */
  position: relative;
}
.topmenu ul a {
  text-align:center;
  padding: .25em 0 .45em;
  background-color:#E7791C;
  border-radius: 8px;
  color:#fff;
  text-decoration:none;
  /* max-height: 66px; */
}
.topmenu li:hover>a {
  background-color:#E7791C;
  font-size:13px;
  color:#fff;
  text-decoration:none;
}
.topmenu span {
  display: inline-block;
}
.topmenu a {
  display:block;
  font-size:13px;
  padding: .25em 0 .45em;
  text-align:center;
  vertical-align:middle;
  text-decoration:none;
  color:#fff;
  cursor:pointer;
  background-color:#bfb79f;
}
.topmenu li:hover>a {
  /* background-color: rgba(0,0,0,.75) ; */
  background-color: #bfb79f;
}
.topmenu ul li:hover>a {
  background-color:#c1560e;
}
.topmenu_item a {
  border-radius: 8px;
  /* cursor:default; */
}

.topmenu_item.knop2,
.topmenu_item.knop3,
.topmenu_item.knop4 {
  margin-left:.8125em;
}
.topmenu_item ul li {
  padding-top: .25em;
}
.topmenu_item ul li a {
  max-width: 90%;
  margin-left: 5%;
}
.topmenu_item.knop2 a {
  background-color:#568FA6;
}
.topmenu_item.knop2 a:hover,
.topmenu_item .knop2_list a {
  background-color:#80abbc;
}
.topmenu_item .knop2_list a:hover {
  background-color:#568FA6;
}
.topmenu_item.knop3 a {
  background-color:#cc6633;
}
.topmenu_item.knop3 a:hover,
.topmenu_item .knop3_list a {
  background-color:#d98c66;
}
.topmenu_item .knop3_list a:hover {
  background-color:#cc6633;
}
.topmenu_item.knop4 a {
  background-color:#8c837b;
}
.topmenu_item.knop4 a:hover,
.topmenu_item .knop4_list a {
  background-color:#a9a29c;
}
.topmenu_item .knop4_list a:hover {
  background-color:#8c837b;
}

@media (min-width: 500px) {
  .menu,
  .topmenu,
  .topmenu_item   {
    float: left;
  }
  .menu {
    margin: 1em 0 3em 1em;
    padding: 0;
    background: transparent;
    border: none;
  }
  .topmenu_item {
    margin-top: 0;
    background: #fff;
  }
  .topmenu_item ul {
    max-height: 0;
    opacity: 0;
    -webkit-transition: opacity 0.4s ease-out 0.1s;
    -moz-transition: opacity  0.4s ease-out .1s;
    -ms-transition: opacity 0.4s ease-out .1s;
    transition: opacity 0.4s ease-out .1s;
    /* position:absolute; */
    position: relative;
    left:0;
    z-index: -2;
}
  .topmenu_item:hover > ul {
    /* display: block; */
    min-height: 100%;
    opacity: 1;
    z-index: -1; 
   }
  
  .topmenu_item a,
  .topmenu_item a:focus {
    outline: none !important;
  }
 }


              
            
!

JS

              
                /* Transitions on `opacity` on larger screens for nested list items.
*  [feedback to question on forum](https://css-tricks.com/forums/topic/transition-on-a-menu/#post-164387)
* Original design by [Rutger Schuijff](http://www.rs-design.nl/ontwerp/rutger.html "Rutger Schuijff on rs-design.nl")
*/
              
            
!
999px

Console