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

              
                <!-- This demo uses float grid but you can use flex grid too -->

<div class="row">
  <div class="columns">
    <h2>Horizontal Dropdown Menu</h2>
    <p><strong>Set up:</strong> Dropdown menus build on the <a href="foundation.zurb.com/sites/docs/">Menu</a> component's syntax. Add the class <code>.dropdown</code> and the attribute <code>data-dropdown-menu</code> to the menu container to set up the dropdown.</p>
    <p><strong>Activate:</strong> To create dropdown menus, nest a new <code>&lt;ul&gt;</code> inside an <code>&lt;li&gt;</code>. You can nest further to create more levels of dropdowns.</p>
    <div class="primary callout">
      <p>Note that the <code>&lt;ul&gt;</code> goes <em>after</em> the <code>&lt;a&gt;</code>, and not inside of it.</p>
    </div>
  </div>
</div>

<div class="row">
  <div class="columns">
    <ul class="dropdown menu" data-dropdown-menu>
      <li>
        <a href="#Item-1">Item 1</a>
        <ul class="menu">
          <li><a href="#Item-1A">Item 1A</a></li>
          <li>
            <a href="#Item-1B">Item 1B</a>
            <ul class="menu">
              <li><a href="#Item-1Bi">Item 1B i</a></li>
              <li><a href="#Item-1Bii">Item 1B ii</a></li>
              <li>
                <a href="#Item-1Biii">Item 1B iii</a>
                <ul class="menu">
                  <li><a href="#Item-1Biiialpha">Item 1B iii alpha</a></li>
                  <li><a href="#Item-1Biiiomega">Item 1B iii omega</a></li>
                </ul>
              </li>
              <li>
                <a href="#Item-1Biv">Item 1B iv</a>
                <ul class="menu">
                  <li><a href="#Item-1Bivalpha">Item 1B iv alpha</a></li>
                </ul>
              </li>
            </ul>
          </li>
          <li><a href="#Item-1C">Item 1C</a></li>
        </ul>
      </li>
      <li>
        <a href="#Item-2">Item 2</a>
        <ul class="menu">
          <li><a href="#Item-2A">Item 2A</a></li>
          <li><a href="#Item-2B">Item 2B</a></li>
        </ul>
      </li>
      <li><a href="#Item-3">Item 3</a></li>
      <li><a href="#Item-4">Item 4</a></li>
    </ul>
  </div>
</div>



              
            
!

CSS

              
                /* Demo Styles */

body {
  padding: 2rem 1rem;
}
              
            
!

JS

              
                $(document).foundation();
              
            
!
999px

Console