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

              
                <div class="dropdown">
  
  <button 
  class="dropdown-notify-btn"
  id="dLabel"
  type="button">
    <i class="fa fa-envelope-o"></i>
    <span class="badge">3</span>
    Messages
    <span class="caret"></span>
  </button>
  
  <ul class="dropdown-menu">
    <a href="#">
      <li class="dropdown-notify
      dropdown-notify-header">
        View All
      </li>
    </a>
    <a href="#">
      <li class="dropdown-notify">
        <p class="notify-title">Title 1</p>
        <p class="notify-msg">Enim facilisi mattis 
          taciti in iaculis parturient torquent justo 
          elit tincidunt eu interdum vestibulum dolor 
          adipiscing auctor sed parturient.
        </p>
        <p class="notify-date">11/17/2016</p>
      </li>
    </a>
    <a href="#">
      <li class="dropdown-notify">
        <p class="notify-title">Title 1</p>
          <p class="notify-msg">Enim facilisi mattis 
            taciti in iaculis parturient torquent justo 
            elit tincidunt eu interdum vestibulum dolor 
            adipiscing auctor sed parturient.
          </p>
          <p class="notify-date">11/17/2016</p>
      </li>
    </a>
    <a href="#">
      <li class="dropdown-notify">
        <p class="notify-title">Title 1</p>
        <p class="notify-msg">Enim facilisi mattis 
          taciti in iaculis parturient torquent justo 
          elit tincidunt eu interdum vestibulum dolor 
          adipiscing auctor sed parturient.
        </p>
        <p class="notify-date">11/17/2016</p>
      </li>
    </a>
  </ul>
  
</div>

              
            
!

CSS

              
                html {height: 100%;}
body {
   background: #17469e;
   background-repeat: no-repeat;
    height: 100%;
    padding: 0;
    margin: 0;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
}
* {
   font-family: 'Roboto', sans-serif;
}

.dropdown {
   display: inline-block;
}
ul.dropdown-menu {
  min-width: 500px;
   margin-top: 2px;
}
.dropdown-notify {
   display: block;
  padding: 10px 15px;
}
.dropdown-notify:hover {
   background: #eee;
}
.dropdown-notify-btn {
   border: 2px solid #00a99d;
   border-radius: 5px;
   padding: 8px 43px 8px 43px;
   background: white;
   text-transform: uppercase;
   font-weight: 500;
   color: #173e88;
}
.dropdown-notify-header {
   color: white;
   margin-top:-8px;
   border-top-left-radius: 5px;
   border-top-right-radius: 5px;
   background: #347ab8;
   font-weight: 700;
}
.dropdown-notify-header:hover {
   background: #347ab8;
   color: white;
   text-decoration: none;
}
.dropdown-menu a {
   color: #333;
}
.dropdown-menu a:hover {
   color: #333;
   text-decoration: none;
}
.badge {
   background: #F93943;
}
.fa-envelope-o {
   font-size: 18px;
   position: relative;
   top: 1px;
   left: -3px;
   margin-right: 2px;
   color: #173e88;
}
.notify-title {
   font-weight: 700;
}
.notify-message {
   margin-bottom: 5px;
}
.notify-date {
  margin-bottom: 0px;
  font-size: 12px;
  letter-spacing: 1px;
}
              
            
!

JS

              
                $('.dropdown').hover(function() {
  $(this)
    .find('.dropdown-menu')
    .delay(100)
    .stop(true, true)
    .fadeIn(500);
  }, function() {
  $(this)
    .find('.dropdown-menu')
    .stop(true, true)
    .delay(500)
    .fadeOut(500);
});
              
            
!
999px

Console