123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <header class="header" role="banner">
  <!-- div class="wrapper" -->
  <div class="units-row units-split global-navbar end">
    <div class="wrapper">
      <div class="unit-40 end">
        <h1 id="logo" role="logo">Responsive Nav w/ Kube</h1>
      </div>
      <div class="unit-60 hidden-sm">
        <!-- Global Navigation -->
        <nav id="navbar-2" class="navbar global-nav unit-60 end" role="navigation">
          <ul class="nav navbar-nav right">
            <li><a href="#" class="globnav-section-1" data-tools="dropdown" data-target="#globnav-section-1"><i class="fa fa-lock"></i>Login</a></li>
            <li><a href="#" class="globnav-section-2" data-tools="dropdown" data-target="#globnav-section-2"><i class="fa fa-cog"></i>Resources</a></li>
            <li><a href="#" class="globnav-section-3" data-tools="dropdown" data-target="#globnav-section-3"><i class="fa fa-bars"></i>Navigate</a></li>
          </ul>
        </nav>


        <!-- Search Bar -->
        <form action="" class="forms search-form unit-40 end">
          <div class="input-groups">
            <input type="text" name="go" class="input-search-icon width-100" placeholder="Search" />
            <span class="btn-append">
                <button class="btn"><i class="fa fa-search"></i></button>
            </span>
          </div>
        </form>

      </div>
    </div>
  </div>

  <img src="http://dummyimage.com/1998x400/ccc/fff" class="hero-image width-100 hidden-sm" />

  

  <div class="unit-row navigation-toggle end" data-tools="navigation-toggle" data-target="#navbar-1">
    <span>Menu<div class="width-10 pull-right align-center"><i class="fa fa-search"></i></div></span>  
  </div>

  <nav id="navbar-1" class="navbar navbar-collapse end" role="navigation">
    <div class="wrapper">
      <ul class="main nav navbar-nav">
        <li id="search" class="visible-sm">
          <!-- Search Bar -->
          <form action="" class="forms mobile search-form width-90 center end">
            <div class="input-groups">
              <input type="text" name="go" class="input-search-icon width-100" placeholder="Search" />
              <span class="btn-append">
                  <button class="btn"><i class="fa fa-search"></i></button>
              </span>
            </div>
          </form>
        </li>
        <li class="first-nav-item"><a href="#" class="subnav-toggle-1" data-tools="dropdown" data-target="#subnav-section-1">Get Info</a></li>
        <ul id="subnav-section-1" class="dropdown subnav">
          <li><a href="#">Grad e-list</a></li>
          <li><a href="#">Undergrad e-list</a></li>
          <li><a href="#">Chat Sessions</a></li>
          <li><a href="#">Honor Students</a></li>
          <li><a href="#">Out of State</a></li>
          <li><a href="#">Veterans</a></li>
          <li><a href="#">International Undergraduate</a></li>
          <li><a href="#">DACA</a></li>
          <li><a href="#">About Umass Boston</a></li>
          <li><a href="#">Meet Admissions</a></li>
        </ul>
        <li><a href="#" class="subnav-toggle-2" data-tools="dropdown" data-target="#subnav-section-2">Visit</a></li>
        <ul id="subnav-section-2" class="dropdown subnav">
          <li><a href="#">Tour Sign-up</a></li>
          <li><a href="#">Showcase Saturdays</a></li>
          <li><a href="#">Honors College</a></li>
          <li><a href="#">Nursing Sessions</a></li>
          <li><a href="#">Transfer Student</a></li>
          <li><a href="#">Open House</a></li>
          <li><a href="#">Spring Visit Day</a></li>
          <li><a href="#">Welcome Day</a></li>
          <li><a href="#">Parent &amp; Family</a></li>
          <li><a href="#">Group</a></li>
          <li><a href="#">Graduate</a></li>
          <li><a href="#">Plan A Visit</a></li>
        </ul>
        <li><a href="#" class="subnav-toggle-3" data-tools="dropdown" data-target="#subnav-section-3">Apply</a></li>
        <ul id="subnav-section-3" class="dropdown subnav">
          <li><a href="#">Freshman</a></li>
          <li><a href="#">Transfer</a></li>
          <li><a href="#">International Undergraduate</a></li>
          <li><a href="#">Graduate</a></li>
          <li><a href="#">Check Status</a></li>
          <li><a href="#">AP/CLEP</a></li>
        </ul>
        <li><a href="#" class="subnav-toggle-4" data-tools="dropdown" data-target="#subnav-section-4">Cost & Aid</a></li>
        <ul id="subnav-section-4" class="dropdown subnav">
          <li><a href="#">Tuition Fees</a></li>
          <li><a href="#">Student Employment</a></li>
          <li><a href="#">Merit Scholarships</a></li>
          <li><a href="#">Financial Aid</a></li>
          <li><a href="#">Talk To Us</a></li>
        </ul>
        <li><a href="#" class="subnav-toggle-5" data-tools="dropdown" data-target="#subnav-section-5">Admited Students</a></li>
        <ul id="subnav-section-5" class="dropdown subnav">
          <li><a href="#">Checklist</a></li>
          <li><a href="#">Deposit</a></li>
          <li><a href="#">Events</a></li>
          <li><a href="#">Housing &amp; Dining</a></li>
          <li><a href="#">Why Umass Boston</a></li>
        </ul>
        <!-- Global Navigation -->
        <ul class="global nav navbar-nav">
          <li class="visible-sm"><a href="#" class="globnav-section-1" data-tools="dropdown" data-target="#globnav-section-1"><i class="fa fa-lock"></i>Login</a></li>
          <!-- Login Dropdown -->
          <ul id="globnav-section-1" class="dropdown subnav">
            <li><a href="#">Email</a></li>
            <li><a href="#">BlackBoard</a></li>
            <li><a href="#">Wiser</a></li>
            <li><a href="#">HR Direct</a></li>
          </ul>
          <li class="visible-sm"><a href="#" class="globnav-section-2" data-tools="dropdown" data-target="#globnav-section-2"><i class="fa fa-cog"></i>Resources</a></li>
          <!-- Resources Dropdown -->
          <ul id="globnav-section-2" class="dropdown subnav">
            <li><a href="#">Directory</a></li>
            <li><a href="#">Library</a></li>
            <li><a href="#">Getting Here</a></li>
            <li><a href="#">News</a></li>
            <li><a href="#">Calandar</a></li>
            <li><a href="#">Maps</a></li>
          </ul>
          <li class="visible-sm"><a href="#" class="globnav-section-3" data-tools="dropdown" data-target="#globnav-section-3"><i class="fa fa-bars"></i>Navigate</a></li>
          <!-- Navigate Dropdown -->
          <ul id="globnav-section-3" class="dropdown subnav">
            <li><a href="#">About</a></li>
            <li><a href="#">Academics</a></li>
            <li><a href="#">Admissions</a></li>
            <li><a href="#">Research</a></li>
            <li><a href="#">Students</a></li>
            <li><a href="#">Faculty &amp; Staff</a></li>
            <li><a href="#">Athletics</a></li>
            <li><a href="#">Giving</a></li>
            <li><a href="#">Alumni</a></li>
          </ul>
        </ul>
        
        
        
      </ul>
    </div>
  </nav>
  
  <img src="http://dummyimage.com/960x400/ccc/fff" class="hero-image width-100 visible-sm" />

  <!-- /div -->
</header>

<div class="wrapper main" role="main">
  <div class="inner-wrapper">
    <br>
    <br>
    <div class="units-row end">
      <h3 class="align-center">&rarr; RESIZE THE SCREEN! &larr;</h3>
      <div class="content-wrapper">
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec in lobortis magna, quis pretium dui. Sed laoreet ex ut justo maximus aliquet. Praesent at pulvinar lacus. Aliquam finibus est sapien, interdum lacinia justo vehicula in. Vivamus dignissim
          odio a risus venenatis, at vestibulum ligula tempor. Curabitur ut porta justo. Aliquam ut porttitor urna. Cras nec rutrum justo. Aliquam iaculis finibus ligula vel tempor.</p>

        <p>Nulla posuere libero magna, vel vestibulum sem finibus eget. Nunc dapibus lacus ullamcorper turpis suscipit, sit amet malesuada velit mattis. Nullam id posuere magna. Integer pulvinar, nibh vitae porttitor suscipit, nisi lacus posuere quam, quis
          sodales diam elit sed lorem. Suspendisse potenti. Pellentesque sodales, quam eu bibendum consectetur, felis arcu egestas libero, quis commodo ligula felis at elit. Suspendisse eu pharetra ex, id vehicula eros. Morbi quis sodales arcu</p>

        <p>Maecenas sodales id ipsum ut venenatis. Proin dolor mi, tristique et lectus quis, auctor tincidunt ipsum. Praesent sagittis purus eget tortor congue bibendum. In luctus gravida ultricies. Donec commodo lorem quam, a maximus ante tempor sit amet.
          Donec fermentum felis nec hendrerit condimentum. Proin eu mauris nec turpis ultricies accumsan sollicitudin at nibh. Pellentesque quam risus, sodales vel tincidunt sed, vulputate sollicitudin ligula. Morbi non purus sapien. Maecenas blandit,
          metus at dignissim tempor, libero metus ornare ligula, et lobortis nisi enim eu erat. Nunc vestibulum augue sit amet nunc mollis lobortis. Aliquam suscipit erat at dui ultricies egestas. Suspendisse id metus pharetra massa blandit dictum quis
          a ante.</p>

        <br><br>

      </div>

    </div>
  </div>
</div>

<footer id="footer" role="contentinfo">
  <div class="units-row wrapper">
    <div class="unit-10">
      <div class="center-image">
        <img src="http://dummyimage.com/69x92/ccc/fff" />
      </div>
    </div>
    <div class="unit-30">
      <ul>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
      </ul>
    </div>
    <div class="unit-30">
      <ul>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
        <li><a href="#">List Item</a></li>
      </ul>
    </div>
    <div class="unit-30">
      <ul>
        <li>
          <tel><a href="#">123.456.7890</a></tel>
        </li>
        <li>&nbsp;</li>
        <li><address><a href="#">123 Street Name<br/>City, State 01234</a></address></li>
        <li>&copy; Copyright</li>
      </ul>
    </div>
  </div>
</footer>
            
          
!
            
              /*
  CSS File 
*/
/* 
-----------------------------------------------------------------------------*/

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,300,300italic,600,600italic,700,700italic,800,800italic);

/* Gray Scale */
$black: #000000;
$gray04: #0A0A0A;
$gray07: #121212;
$gray13: #212121;
$gray19: #303030;
$gray22: #383838;
$gray28: #474747;
$gray30: #4D4D4D;
$gray35: #595959;
$gray38: #616161;
$gray65: #A6A6A6;
$gray80: #CCCCCC;
$gray82: #D1D1D1;
$gray95: #F2F2F2;
$gray97: #F7F7F7;
$gray98: #FAFAFA;
$white: #FFFFFF;

/* Global Variables */
$font-stack: 'Open Sans', Arial, Sans-serif;
$primary-text-color: $gray13;
$body-background-color: $gray95;
$content-wrapper-background: $white;
$margin-bottom: 1.65em;

/* =Global
-----------------------------------------------------------------------------*/

body {
  font-family: 100% $font-stack;
  font-size: 1em;
  color: $primary-text-color;
  background: $body-background-color;
  width: 100%;
}
.header {
  background: $gray98;
  border-bottom: 1px solid $gray30;
}

.align-center {text-align: center;}
.center {margin: 0 auto;}

/* General Mobile First Styles */ 
.hidden-sm {
  display: none;  
}

@media screen and (min-width: 769px) {
  .visible-sm {
    display: none;
  }
  .hidden-sm {
    display: block;  
  }
}

/* =Header
-----------------------------------------------------------------------------*/

h1#logo {
  font-size: 2.25em;
  padding: .25em 0 .35em .35em;
  margin: 0 0 0 0;
  transition:font-size .5s ease;
  -moz-transition:font-size .5s ease; /* Firefox 4 */
  -webkit-transition:font-size .5s ease; /* Safari and Chrome */
  -o-transition:font-size .5s ease;
}

@media screen and (max-width: 1200px) {
  h1#logo {
    font-size: 1.7em;
    transition:font-size .5s ease;
    -moz-transition:font-size .5s ease; /* Firefox 4 */
    -webkit-transition:font-size .5s ease; /* Safari and Chrome */
    -o-transition:font-size .5s ease;
  }
}

/* =Navigation
-----------------------------------------------------------------------------*/
.navigation-toggle {
  border-bottom: 1px solid #4D4D4D;
  transition:background-color .5s ease;
  -moz-transition:background-color .5s ease; /* Firefox 4 */
  -webkit-transition:background-color .5s ease; /* Safari and Chrome */
  -o-transition:background-color .5s ease;
  &:after {
    font-family: FontAwesome;  
    content: "\f0c9";
    speak: none;
    /*border-width: 4px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    border-radius: 6px;
    border: solid 1px #dddddd;
    padding: .2em .25em .15em;*/
  }
}
.navigation-toggle.active:after {
  color: $gray95;
  font-size: 1.3em;
  content: "\f00d";
  speak: none;
}
.navigation-toggle span {
  padding: 10px 10px 10px 40px;
}
.navigation-toggle.active span div.width-10 {
  display: none;
}
.dropdown-in .caret {
  border-top: none;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-bottom: 5px solid;
}
ul.dropdown {
  max-height: none;
  height: auto;
}
ul.dropdown li {
  width: 100%;
  height: auto;
  & a {
    width: 100%;
    height: auto;
    line-height: 1.65em;
    padding: 10px 15px;
  }
}

/* Mobile First */
.navigation-toggle.active {
  color: $gray97;
  background-color: $gray22;
  transition:background-color .5s ease;
  -moz-transition:background-color .5s ease; /* Firefox 4 */
  -webkit-transition:background-color .5s ease; /* Safari and Chrome */
  -o-transition:background-color .5s ease;
}

/* Global Navigation */
.global-navbar {
  border-bottom: 1px solid $gray30;
}
.global-nav {
  margin-top: 3px;
  & ul li {
    font-size: .8em;
    & a {
      display: block;
    }
  }
}  
.search-form {
  margin-top: 0;
}
.global-nav ul li a i {
  display: none;  
}

/* Main Navigation */
.nav a {
  color: $gray13;
  &:hover {
    color: $gray13;
    text-decoration: none;
  }
}
.nav a b.caret {
  border-top-color: $gray65;
  border-bottom-color: $gray65;
}
.nav a:hover b.caret {
  border-top-color: $gray19;
  border-bottom-color: $gray19;
}

/* Navigation Media Queries */
@media screen and (min-width: 769px) {
  .search-form {
    margin-top: .25em;
    padding-right: .25em;
  }
  ul.main.nav {
    padding: 0 0 0 1.35em;
  }
}

@media screen and (max-width: 768px) {
  #navbar-1 {
    color: $gray97;
    background-color: $gray22;
  }
  .first-nav-item {
    margin-top: 1em;
  }
  .navbar ul li a {
    color: $gray97; 
    padding: 11px 15px;
    &:hover {
      color: $gray04;
      background-color: $gray80;
    }
  }
  .navbar ul li:last-of-type a {
      border-bottom: 1px solid transparent; 
    &:hover{
      border-bottom: 1px solid $gray22;
    }
  }   
  .navbar ul li {
    border-bottom: 1px solid $gray80;
    &#search {
      border-bottom: none;  
    }
  }
  .nav a b.caret {
    position: absolute;
    right: 1em;
    margin-top: .6em;
  }
  .dropdown {
    width: 100%;
    &.subnav li {
      background-color: $gray35;
      border-top: 1px solid $gray30;
      border-bottom: 1px solid $gray80;
      & a {
        padding-left:40px; 
      } 
    }
    
  }
  form.mobile span.btn-append {
    padding: 0;  
  }
  ul.global {
    padding-top: .825em;
  }
}

@media screen and (min-width: 1100px) {
  .global-nav ul li a i {
    display: inline-block;  
  }
}   

/* =Wrapper
-----------------------------------------------------------------------------*/

div.wrapper {
  margin: 0 auto;
  padding: 0;
  max-width: 1200px;
  &.main {
    background: #FFFFFF;
  }
}div.wrapper div.inner-wrapper {
  margin: 0 auto;
  padding: 0 1.6em 0 1.6em;
}

/* =Footer
-----------------------------------------------------------------------------*/

#footer {
  background: #404040;
  color: #ccc;
  flex-shrink: 0;
  & .wrapper {
    padding: 2em;
  }  
}
#footer ul {margin-left: 0;}
#footer .unit-30 ul li {
  list-style-type: none;
  text-align: center;
  & a {
  color: $white;
  text-decoration: none;
  }  
}


@media only screen and (max-width: 960px) {
  #footer div.unit-10 div.center-image {
      width: 69px;
      margin: 0 auto;
  }
}


            
          
!
            
              (function($) {
  var timing = 350;
  $.fn.navigationToggle = function(options) {
    return this.each(function() {
      $.data(this, 'navigationToggle', {});
      $.data(this, 'navigationToggle', NavigationToggle(this, options));
    });
  };

  function NavigationToggle(el, options) {
    return new NavigationToggle.prototype.init(el, options);
  }
  $.NavigationToggle = NavigationToggle;
  $.NavigationToggle.NAME = 'navigation-toggle';
  $.NavigationToggle.VERSION = '1.0';
  $.NavigationToggle.opts = {
    target: false
  };
  NavigationToggle.fn = $.NavigationToggle.prototype = {
    init: function(el, options) {
      this.$element = el !== false ? $(el) : false;
      this.loadOptions(options);
      this.$target = $(this.opts.target);
      this.$toggle = this.$element.find('span');
      this.$toggle.on('click', $.proxy(this.onClick, this));
      this.build();
      $(window).resize($.proxy(this.build, this));
    },
    loadOptions: function(options) {
      this.opts = $.extend({}, $.extend(true, {}, $.NavigationToggle.opts), this.$element.data(), options);
    },
    setCallback: function(type, e, data) {
      var events = $._data(this.$element[0], 'events');
      if (events && typeof events[type] != 'undefined') {
        var value = [];
        var len = events[type].length;
        for (var i = 0; i < len; i++) {
          var namespace = events[type][i].namespace;
          if (namespace == 'tools.' + $.NavigationToggle.NAME || namespace == $.NavigationToggle.NAME + '.tools') {
            var callback = events[type][i].handler;
            value.push((typeof data == 'undefined') ? callback.call(this, e) : callback.call(this, e, data));
          }
        }
        if (value.length == 1) return value[0];
        else return value;
      }
      return (typeof data == 'undefined') ? e : data;
    },
    build: function() {
      var mq = window.matchMedia("(max-width: 767px)");
      if (mq.matches) {
        if (!this.$target.hasClass('navigation-target-show')) {
          this.$element.addClass('navigation-toggle-show').show();
          this.$target.addClass('navigation-target-show').hide();
        }
      } else {
        this.$element.removeClass('navigation-toggle-show').hide();
        this.$target.removeClass('navigation-target-show').show();
      }
    },
    onClick: function(e) {
      e.stopPropagation();
      e.preventDefault();
      if (this.isTargetHide()) {
        this.$element.addClass('active');
        this.$element.addClass('navigation-toggle-show');
        this.$target.show(timing);
        this.setCallback('show', this.$target);
      } else {
        this.$element.removeClass('active');
        this.$element.removeClass('navigation-toggle-show');
        this.$target.hide(timing);
        this.setCallback('hide', this.$target);
      }
    },
    isTargetHide: function() {
      return (this.$target[0].style.display == 'none') ? true : false;
    }
  };
  $(window).on('load.tools.navigation-toggle', function() {
    $('[data-tools="navigation-toggle"]').navigationToggle();
  });
  NavigationToggle.prototype.init.prototype = NavigationToggle.prototype;
})(jQuery);


$(".subnav-toggle-1").click(function(){
    $("#subnav-section-1").slideDown(500);  
});

$(".subnav-toggle-2").click(function(){ 
    $("#subnav-section-2").slideDown(500);  
});

$(".subnav-toggle-3").click(function(){ 
    $("#subnav-section-3").slideDown(500);  
});

$(".subnav-toggle-4").click(function(){ 
    $("#subnav-section-4").slideDown(500);  
});

$(".subnav-toggle-5").click(function(){ 
    $("#subnav-section-5").slideDown(500);  
});

$(".globnav-section-1").click(function(){ 
    $("#globnav-section-1").slideDown(500);  
});

$(".globnav-section-2").click(function(){ 
    $("#globnav-section-2").slideDown(500);  
});

$(".globnav-section-3").click(function(){ 
    $("#globnav-section-3").slideDown(500);  
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console