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

              
                <nav id="menu">
  <a href="#">Home</a>
  <div class="dropdown">
    <a href="#">Item 1</a>
    <div class="dropdown-content">
      <a href="#">Item 1.1</a>
      <a href="#">Item 1.2</a>
    </div>  
  </div>
  <div class="dropdown">
    <a href="#">Item 2</a>
    <div class="dropdown-content">
      <a href="#">Item 2.1</a>
      <a href="#">Item 2.2</a>
    </div>  
  </div>
</nav>
<h1>Yet another CSS-only dropdown menu</h1>
<h2>Yeah, it may be overdone, but its mine.</h2>

<blockquote>
  This is my code. There are many like it, but this one is mine.<br>
  My code is my best friend. It is my life. I must master it as I must master my life.<br>
  <br>
  Without me, my code is useless. Without my code, I am useless. I must deploy my code true. I must code straighter than my enemy who is trying to debug me. I must debug him before he debug me. I will…<br>
  <br>
  My code and I know that what counts in app is not the lines we code, the syntax of our classes, nor the mehtods we make. We know that it is the compile that count. We will compile…<br>
  <br>
  My code is human, even as I, because it is my life. Thus, I will learn it as a brother. I will learn its weaknesses, its strength, its parts, its accessories, its sights and its properties. I will keep my code clean and ready, even as I am clean and ready. We will become part of each other. We will…<br>
  <br>
  Before God, I swear this creed. My code and I are the defenders of my programming language. We are the masters of our enemy. We are the saviors of my life.<br>
  <br>
  So be it, until victory is Our's and there is no compile errors, but success deploying!<br>
</blockquote>
              
            
!

CSS

              
                /*
Functional Styles:
Must have to work properly.
*/

nav > * {
  display: inline-block;
}

.dropdown:hover .dropdown-content,
.dropdown-content a {
  display: block;
  opacity: 1;
  
}

.dropdown-content {
  display:none;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
}

.dropdown-content a {
  position: relative;
}

/*
Aesthetic Styles:

Anything below is purely for looks.
Feel free to remove to understand what's happening under the hood. */

body {
  background-color: rgba(161,93,44,0.75)
}

nav {
  background-color: #0A272D;
}

.dropdown {
  position: relative;
}

a {
  color: #D1CBA7;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bold;
  
  padding: 15px;
}

a:hover {
  background-color: #658671;
}

.dropdown-content {
  background-color: #A15D2C;
  min-width: 130px;
  left: 0;
  top: 33px;
}

.dropdown-content a {
  color: #0A272D;
}

blockquote {
  border-left: 5px solid rgba(0,0,0,0.2);
  padding-left: 5px;
}
              
            
!

JS

              
                
              
            
!
999px

Console