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 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

              
                <ul class="menu">
  <li><a href="#">Home</a></li>
  <li><a href="#">About</a></li>
  <li><a href="#">Products</a></li>
  <li><a href="#">Contact</a></li>
</ul>
 
              
            
!

CSS

              
                @import "compass/css3";

$menuheight: 32px;
$menu-lo-color: rgba(0, 0, 0, .4);
$menu-mid-color: rgba(0, 0, 0, .2);
$menu-hi-color: rgba(255, 255, 255, .25);
$text-color: #113e66;

body {
  font: 90%/1.5 Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  text-shadow: 1px 1px 1px rgba(255,255,255,.3);
  background: #464646;
  @include background-image(linear-gradient(-45deg, #3e3e3e 15%, #464646 15%, #464646 50%, #3e3e3e 50%, #3e3e3e 65%, #464646 65%, #464646));
  @include background-size(12px 12px);
}

a:link, a:visited, a:hover {
  color: $text-color;
  text-decoration: none;
}

.menu {
  width: 600px;
  height: $menuheight;
  margin: 2em auto;
  padding: 0;
  
  &:after {
    /* clearfix */
    content: "";
    display: table;
    clear: both;
  }
  
  >li {
    position: relative;
    list-style: none;
    float: left;
    width: 21%;
    height: $menuheight;
    line-height: $menuheight;
    padding: 0;
    
    @include background-image(linear-gradient(#3c96e4, #1d74c3));
    border-width: 1px 1px 1px 0;
    border-style: solid;
    border-color: $menu-lo-color;
    @include box-shadow(inset 1px 1px 0 $menu-hi-color);
    @include background-clip(padding-box);
  
    color: $text-color;
    text-align: center;
    font-size: 15px;
    font-weight: bold;    
    cursor: pointer;
    
    &:first-child {
      @include border-radius(8px 0 0 8px);
      border-left-width: 1px;
    }
    
    &:last-child {
      @include border-radius(0 8px 8px 0);
      border-right-color: $menu-lo-color;
    }
  }
  
  a {
    display: block;
    width: 100%;
    height: 100%;
    @include transition(background .2s ease-in-out);
    
    &:hover {
      background: rgba( 0, 0, 0, .1);
    }
  }

}

              
            
!

JS

              
                
              
            
!
999px

Console