cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <div class="ProductPicker">
  <nav class="ProductPicker-nav">
    <a 
       href="#Deals"
       class="NavItem NavItem--is-active">Deals</a>
    <a 
       href="#Transportation"
       class="NavItem">Trips</a>
    <a 
       href="#Fun"
       class="NavItem">Fun</a>
  </nav>
  
  <div class="ProductListWindow">
    <ul 
      id="Deals"
      class="ProductList">
        <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-bus"> </i>
                <h6 class="Product-name">
                  Bus Ride
                </h6>
            </a>
            <span class="Product-price">$3</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-headphones"> </i>
                <h6 class="Product-name">
                  Headphones
                </h6>
            </a>
            <span class="Product-price">$29</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-compass"> </i>
                <h6 class="Product-name">
                  Compass
                </h6>
            </a>
            <span class="Product-price">$5</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-bicycle"> </i>
                <h6 class="Product-name">
                  Bicycle
                </h6>
            </a>
            <span class="Product-price">$399</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      </ul>
      <ul
        id="Trips"
        class="ProductList ProductList--is-hidden">
        <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i  class="Product-icon fa fa-suitcase"></i>
                <h6 class="Product-name">
                  Suitcase
                </h6>
            </a>
            <span class="Product-price">$40</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-plane"></i>
                <h6 class="Product-name">
                  Plane Ride
                </h6>
            </a>
            <span class="Product-price">$350</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-subway"></i>
                <h6 class="Product-name">
                  Subway Ride
                </h6>
            </a>
            <span class="Product-price">$3</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-rocket"></i>
                <h6 class="Product-name">
                  Space Trip
                </h6>
            </a>
            <span class="Product-price">$499</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      </ul>

      <ul
        id="Fun"
        class="ProductList ProductList--is-hidden">
        <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-magic"></i>
                <h6 class="Product-name">
                  Magic Show
                </h6>
            </a>
            <span class="Product-price">$30</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-life-ring"></i>
                <h6 class="Product-name">
                  Swim Lesson
                </h6>
            </a>
            <span class="Product-price">$20</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class="Product-icon fa fa-flask"></i>
                <h6 class="Product-name">
                  Science Lesson
                </h6>
            </a>
            <span class="Product-price">$59</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      <li 
           class="Product">
            <a 
               href="#" 
               class="Product-moreCTA">
                <i class=" Product-icon fa fa-flag-checkered"></i>
                <h6 class="Product-name">
                  Races
                </h6>
            </a>
            <span class="Product-price">$70</span>
            <button class="Product-buyCTA">Buy</button>
        </li>
      </ul>
    </div>
  </div>
</div>
            
          
!
            
              // Palette via Coolors:
// http://app.coolors.co/e8aeb7-b8e1ff-a9fff7-94fbab-82aba1

$border-radius: 10px;

* {
  box-sizing: border-box;
}

.ProductPicker-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.NavItem {
  flex: 1 1 auto;
}

.ProductList {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.Product,
.Product-moreCTA {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.Product {
  flex: 0 1 10em;
  min-height: 15em;
}

/* 
Everything below this is just visual sugar, Darlin' */

.ProductPicker {
  max-width: 50rem;
  margin: 0 auto;
}

.ProductList {
  margin: 0;
  padding: 2em;
  border-radius: 0 0 $border-radius $border-radius;
  border-bottom: 4px solid #eee;
  background: white;
  
  li {
    list-style: none;
  }
}

.ProductList--is-hidden {
  display: none;
}

.ProductList .Product {
  margin-bottom: 1rem;
}

.Product {
  padding: .5em;
  text-align: center;
}

.Product-moreCTA {
  text-decoration: none;
}

.Product-icon {
  margin: 0 0 .5em;
  border-radius: 50%;
  font-size: 50px;
  color: #82ABA1;
}

.Product-name {
  margin: 0;
  font-size: 1.2em;
  font-weight: normal;
  line-height: 1.2;
  color: #82ABA1;
}

.Product-price {
  font-size: 2em;
  font-weight: 600;
  color: #E8AEB7;
}

.Product-buyCTA {
  width: 100%;
  padding: .5em .35em;
  background: #B8E1FF;
  border: none;
  border-radius: $border-radius;
  font-size: 1.25em;
  font-weight: 700;
  text-transform: uppercase;
  color: darken(#B8E1FF, 30%);
}

/* Navigation */
.NavItem {
  padding: .8rem;
  background: #94FBAB;
  font-size: 1.1em;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  color: darken(#94FBAB, 50%);
}

.NavItem:first-of-type {
  border-radius: $border-radius 0 0 0;
}

.NavItem:last-of-type {
  border-radius: 0 $border-radius 0 0;
}

.NavItem--is-active {
  padding-top: 1.1rem;
  background: #E8AEB7;
  font-size: 1.2em;
  color: white;
  
  &,
  &:first-of-type,
  &:last-of-type {
    border-radius: $border-radius $border-radius 0 0;
  }
}


body {
  padding: 2rem 1rem;
  background: url(https://subtlepatterns.com/patterns/debut_light.png);
  font-family: 'Open Sans',Helvetica,Arial,sans-serif;
  font-size: 1em;
  color: #393939;
}

@import url(//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css);
@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700);
            
          
!
            
              $('.NavItem').click(function(evt) {
  evt.preventDefault();
  evt.stopPropagation();
  
  var navItem = $(this),
      allNavItems = $('.NavItem'),
      activeClass = 'NavItem--is-active',
      productLists = $('.ProductList'),
      hiddenClass = 'ProductList--is-hidden';
  
  // Highlight the correct nav item
  allNavItems.removeClass(activeClass);
  navItem.addClass(activeClass);
  
  // Hide all product lists, then show the one
  // matching the index of the clicked nav item
  productLists.addClass(hiddenClass);
  productLists.eq(navItem.index())
    .removeClass(hiddenClass);
})
            
          
!
999px
Loading ..................

Console