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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

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

<div class="row">
  <div class="columns">
    <h2>Vertical 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>
    <p><strong>Vertical:</strong> Add the <code>.vertical</code> class to the top-level menu to make it vertical. Sub-menus are automatically vertical, regardless of the orientation of the top-level menu.</p>
    <div class="primary callout">
      <p>Menus are block-level elements, which means they stretch to fill the width of their container. To make the below example less goofy, we've hard-coded a <code>max-width</code> on the menu.</p>
    </div>
  </div>
</div>

<div class="row">
  <div class="columns">
    <ul class="vertical dropdown menu" data-dropdown-menu style="max-width: 250px;">
      <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