Need help adjusting Foundation 5 CSS top-bar breakpoint

14 views Asked by At

I've seen a number of solutions here on StackOverflow and elsewhere to adjust the breaking point for Foundation 5's top-bar so the mobile menu is displayed not only at small screen sizes, but none of them are working for me.

I'd like to set a custom width at which the main menu snaps to the mobile style. Or, at the very least, snap it to mobile at the pre-defined medium screen size.

I would think this would be possible by adjusting foundation.topbar.js — especially by adding something into settings{}, but I haven't yet found a solution. Is there a settings value that would control that?

I'm using the CSS version of Foundation, not SASS.

I'm trying to get a solution working on a standard top-bar as provided by Foundation, to assure it isn't my own HTML that is somehow the problem. This is the top-bar I've been working with:

  <ul class="title-area">
    <li class="name">
      <h1><a href="#">My Site</a></h1>
    </li>
     <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
    <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
  </ul>

  <section class="top-bar-section">
    <!-- Right Nav Section -->
    <ul class="right">
      <li class="active"><a href="#">Right Button Active</a></li>
      <li class="has-dropdown">
        <a href="#">Right Button Dropdown</a>
        <ul class="dropdown">
          <li><a href="#">First link in dropdown</a></li>
          <li class="active"><a href="#">Active link in dropdown</a></li>
        </ul>
      </li>
    </ul>

    <!-- Left Nav Section -->
    <ul class="left">
      <li><a href="#">Left Nav Button</a></li>
    </ul>
  </section>
</nav>


0

There are 0 answers