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

              
                <center><div id="menu">
<ul >
  <li><a href="#"> option 1 </a>
  <ul>
    <li> option 1.a with long description which a lil bit odd</li>
    <li> option 1.x </li>
    </ul>
  </li>
  <li><a href="#"> option 2 </a>
  <ul>
    <li> option 2.a </li>
    <li> option 2.b </li>
    <li> option 2.x </li>
    <li> short desc.
    <ul>
      <li>another submenu</li>
      </ul>
    </li>
    </ul>
  <li>
    <a href="#"> option 3 </a>
     <ul> 
        <li> option 3.a </li>
        <li> 
          option 3.b with quite long and
          rigorous description too.
       </li>
      </ul>
    </li>
</ul>
</div>
  <br/><br/>
  <span style="font-family:Calibri;font-weight:bold;font-size:12px;">Simplification of <a target="_blank" href="https://line25.com/tutorials/how-to-create-a-pure-css-dropdown-menu">Pure CSS Drop Down Menu</a>, a great crystal clear tutorial by Chris Spooner</span>
  
  </center>
              
            
!

CSS

              
                body
{
  font-family:Courier;
  font-weight:700;font-size:18px;
  background:#effefe;}

#menu ul {
	background: orange; 
	box-shadow: 0px 2px 5px grey;
	padding: 0;
	list-style: none;
	position: relative;
	display: inline-block;}

#menu ul li {float:left;padding:0;}

#menu ul li:hover {
  cursor:pointer; 
  background: #ff8800;}
	
#menu ul li a {
  display: block; 
  padding: 20px 40px;	
  color: black; 
  text-decoration: none;}

#menu ul ul {
  display: none;
	background: orange;   
  padding:0px;width:33.3%;
	position: absolute;top: 100%;}

#menu ul li:hover > ul {display: block;}

#menu ul ul li {
  float: none; 
  text-align:center;
	position: relative;
  padding:10px;
  border-bottom:1px solid #ffb861;
  border-top:1px solid #e37d00;}

#menu ul ul ul { 
  position:absolute;
  top:-1px;
  left:100%;
  width:120%;}
              
            
!

JS

              
                //no fade fx and all, this is the basic pattern I suppose.
//no plugin or custom script.
              
            
!
999px

Console