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

              
                <div class="site-wrapper">
<header class="row">
  <div class="container row">
  <a href="#menu-toggle" class="menu-icon">
    <img src="https://dl.dropboxusercontent.com/u/706446/_linked%20stuff/rwd%20undervisning/site/hamburger.SVG" alt="menu" />
  </a>
  <div class="logo offset-1 col-2"><img src="https://dl.dropboxusercontent.com/u/706446/_linked%20stuff/rwd%20undervisning/site/logo_zoup.svg" alt="" /></div>
  <p class="tagline col-5 offset-3">
    "Zoup Brings You Delicious Hot Soup Over The Wire"
  </p>
  </div>
  <div class="row">
    <ul class="nav hide-on-mobile col-8 offset-3">
      <li><a href="#">Home</a></li>
      <li><a href="#">Recipes</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#"><button>Get Zoup'D!</button></a></li>
    </ul>
  </div>
</header>
<div class="main">
  <section class="introduction">
    <div class="row">
      <div class="col-8 offset-2">
        <p>Now you can have your soup over the internet! You can buy-as-you-go or choose one of our subscription plans. It’s delicios!</p>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Illi enim inter se dissentiunt. Quid est, quod ab ea absolvi et perfici debeat? Non modo carum sibi quemque, verum etiam vehementer carum esse? Ita prorsus, inquam; Tu vero, inquam, ducas licet, si sequetur; Quo igitur, inquit, modo? 
        Animum autem reliquis rebus ita perfecit, ut corpus; Utinam quidem dicerent alium alio beatiorem! Iam ruinas videres. Tecum optime, deinde etiam cum mediocri amico. Uterque enim </p>
      </div>
    </div>
    
  </section>
  <section class="video">
    <iframe width="560" height="315" src="https://www.youtube.com/embed/QS0I7mLQIgc?modestbranding=1&rel=0&start=20&disablekb=1&controls=0" frameborder="0" allowfullscreen></iframe>
  </section>¨
  <section class="how">
    <ul class="how-to-steps row">
      <li class="col-2 offset-2">
        <img src="https://dl.dropboxusercontent.com/u/706446/_linked%20stuff/rwd%20undervisning/site/pay.svg" alt="Pay" />
        <h2>1. Pay</h2>
      </li>
      <li class="col-2 offset-1">
        <img src="https://dl.dropboxusercontent.com/u/706446/_linked%20stuff/rwd%20undervisning/site/download.svg" alt="Download" />
        <h2>2. Download</h2>
      </li>
      <li class="col-2 offset-1">
        <img src="https://dl.dropboxusercontent.com/u/706446/_linked%20stuff/rwd%20undervisning/site/eat.svg" alt="Eat" />
        <h2>3. Eat</h2>
      </li>
    </ul>
  </section>
  <section class="plans row">
    <div class="month col-4">
      <h2>Monthly Boozt</h2>
      <p class="quote">"I like hot soup in the winther"</p>
      <p class="price">$60<small>/month</small></p>
      <ul class="features">
        <li>Unlimited soup for a month</li>
        <li>Meet soup enthusiasts online</li>
      </ul>
      <button class="pink">Uhhhm! I'm in!</button>
    </div>
    <div class="year col-4">
      <h2>The Prepper</h2>
      <p class="quote">"I admit it, I'm addicted!"</p>
      <p class="price">$650<small>/year</small></p>
      <ul class="features">
        <li>Unlimited soup for a year</li>
        <li>Meet online soup enthusiasts</li>
        <li>Build your own soup-loving action figure</li>
      </ul>
      <button class="purple">Best Value!</button>
    </div>
    <div class="to-go col-4">
      <h2>The Go-Getter</h2>
      <p class="quote">"I've got commitment issues"</p>
      <p class="price">$5<small>/month</small></p>
      <ul class="features">
        <li>Buy one soup</li>
        <li>No commitments</li>
      </ul>
      <button class="grey">Feed me now!</button>
    </div>
  </section>
  <section class="slider">
     <img src="https://dl.dropboxusercontent.com/u/706446/_linked%20stuff/rwd%20undervisning/site/soup_1920w.jpg" alt="Nice soup!" />
  </section>
</div>
<footer>
  <p class="copyright">©2014 Zoup  Company</p>
</footer>
</div>
<aside class="nav-mobile">
  <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">Recipes</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Get Zoup'D</a></li>
  </ul>
</aside>
              
            
!

CSS

              
                /* Colors */
$hot-pink: #f20ca2;
$superiour-purple: #a314ef;
$light-grey: #a6a6a6;
$dark-grey: #727372;
$black: #232323;
$white: #f2f2f2;

ul.nav, ul.how-to-steps {
  list-style-type: none;
  padding: 0;
  li {
    display: inline-block;
  }
}
html {
  box-sizing: border-box;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: $light-grey;
}
body, p {
  font-family: 'Open Sans Condensed', sans-serif;
}
h1, h2, h3, h4, h5 {
  font-family: 'Luckiest Guy', sans-serif;  
}
ul.nav li {
  font-family: 'Luckiest Guy', sans-serif; 
}
button {
  margin: 1em;
  padding: 0.8em;
  padding-bottom: 0.5em;
  background: none;
  border: 3px solid $black;
  border-radius: 1em;
  font-size: 1.3em;
  font-family: 'Luckiest Guy', sans-serif;
  &.pink {
    color: $white;
    border: 3px solid $white;
    background-color: $hot-pink;
  }
  &.purple {
    color: $white;
    border: 3px solid $white;
    background-color: $superiour-purple;
  }
  &.grey {
    color: $white;
    border: 3px solid $white;
    background-color: $light-grey;
  }
}
header {
  background-color: $hot-pink;
  color: $white;
  padding-top: 2em;
  
  .logo {
    float: left;
  }
  .tagline {
    float: left;
    text-align: right;
    font-family: 'Luckiest Guy', sans-serif;
    font-size: 2em;
  }
  .nav {
    font-size: 1.3em;
    text-align: right;
    li {
      padding-right: 1em;
    }
    li:last-child {
      padding-right: 0;
    }
    
    button {
      color: $white;
      margin: 0;
      border: 3px solid $white;
    }
  }
}
section.introduction {
  color: $black;
  padding: 2em 0 2em 0;
}
section.how {
  padding: 2em 0 2em 0;
  background-color: $superiour-purple;
  color: $white;
  text-align: center;
}
section.plans {
  text-align: center;
  color: $white;
  
  > div {
    min-height: 380px;
    padding-top: 4em;
    padding-bottom: 2em;
  }
  
  p.price {
    font-family: 'Luckiest Guy', sans-serif;
    font-size: 2em;
    small {
       font-family: 'Open Sans Condensed', sans-serif;
      font-size: 0.4em;
    }
  }
  
  ul {
    text-align: left;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .month {
    background-color: $light-grey;
  }
  .year {
    background: $black;
  }
  .to-go {
    background-color: $dark-grey;
  }
}
section.slider {
  
}
footer {
  background-color: $black;
  color: $hot-pink;
  padding: 2em;
  margin-top: -4px;
  
  p.copyright {
    text-align: center;
  }
}

/* Lesson 2: Fluid-width grid */

$width: 960px;
$columns: 12;

body {
  max-width: 1440px;
  margin: 0 auto;
}

img {
  max-width: 100%;
}

.row:after {
  content: "";
  display: table;
  clear: both;
}

@for $i from 1 through $columns {
  .col-#{$i} {
    width: percentage(1/$columns * $i);
    float: left;
  }
  .offset-#{$i} {
    margin-left: percentage(1/$columns*$i);
  }
}

@media screen and (max-width: 640px) {
  [class*="col-"] {
    float: none;
    width: 100%;
  }
  [class*="offset-"] {
    margin-left: 0;
  }
  .row {
    padding-left: 2em;
    padding-right: 2em;
  }
  .plans.row {
    padding: 0;
  }

  /* Disse ændringer blev ikke nævnt i videoen
  * Det er vigtigt at gøre skriftstørrelsen større
  * på mobile devices, da skræmen er mindre og pixeltætheden højere
  */
  body {
    font-size: 24px;
  }
  header p.tagline {
    text-align: center;
    font-size: 1em;
  }
  .hide-on-mobile {
    display: none;
  }
}
.menu-icon {
  position: fixed;
  top: 1em;
  left: 1em;
}
.site-wrapper {
  position: absolute;
  left: 0;
  width: 100%;
}
aside.nav-mobile {
  background-color: $black;
  color: $white;
  font-weight: bold;
  min-height: 100%;
  width: 75%;
  position: fixed;
  left:-75%;
  
  ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }
  li {
    padding: 1em;
    border-bottom: 1px solid $dark-grey;
  }
}
body.menu-active {
  aside.nav-mobile {
    left: 0;
  }
  .site-wrapper {
    left: 75%;
  }
  .menu-icon {
    left: 76%;
  }
}
.site-wrapper, aside.navigation, .menu-icon {
  transition-property: left;
  transition-duration: 0.2s;
}
              
            
!

JS

              
                $('a[href="#menu-toggle"]').click(function(e){
  e.preventDefault();
  $('body').toggleClass('menu-active');
});
              
            
!
999px

Console