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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <link href='https://fonts.googleapis.com/css?family=Lato:100,300,400,700' rel='stylesheet' type='text/css'>

<div class="container">
  
  <div class="overlay"></div>

  <header>
  
    <div class="navBtn">+</div>

    <nav>
      <a href="">Home</a>
      <a href="">About</a>
      <a href="">Contact</a>
    </nav>

  </header>
  
  <div class="main">
    
    <img id="hero" src="https://i.imgur.com/X8B40Gf.png" alt="" />
    
    <article>
    
      <h3>Slick Slide Navigation</h3>
    
      <p>Sriracha Brooklyn drinking vinegar, put a bird on it cray lo-fi 8-bit you probably haven't heard of them PBR&B post-ironic. Sint eu direct trade occaecat single-origin coffee pickled 3 wolf moon nisi, asymmetrical commodo gastropub fixie locavore. Brooklyn kogi flexitarian, pariatur cardigan umami laboris do trust fund Thundercats exercitation Bushwick Austin. Cillum aliquip wayfarers, sed farm-to-table literally meggings 90's aliqua commodo Godard. Next level authentic 90's esse lo-fi asymmetrical. Cred Godard ut, ad Carles deep v Truffaut id Schlitz Odd Future nihil cupidatat art party. Bushwick gluten-free do organic tempor.</p>

      <p>Tofu pickled Banksy sed Neutra, beard DIY cornhole drinking vinegar mumblecore gentrify swag hashtag ennui. Ethnic pop-up enim shabby chic, aliqua Blue Bottle adipisicing minim quis put a bird on it. Gastropub 3 wolf moon nihil, Neutra scenester forage kitsch paleo disrupt nesciunt nostrud vegan vinyl narwhal laboris. Vinyl DIY selfies, McSweeney's do cardigan roof party 8-bit Pinterest 3 wolf moon church-key. Gentrify Odd Future sunt incididunt street art occaecat. Umami irony adipisicing, et put a bird on it PBR anim meggings. Skateboard cray laboris commodo, iPhone kogi anim Carles dolore non shabby chic magna occupy PBR.</p>

      <p>Vice culpa meh accusamus pork belly. Next level beard pariatur, try-hard fixie raw denim Schlitz ad velit Blue Bottle. Ut plaid pariatur, trust fund Terry Richardson you probably haven't heard of them Marfa ad nihil cardigan Pitchfork ethnic incididunt. Yr banh mi whatever 3 wolf moon before they sold out sartorial quinoa sapiente, +1 gastropub Marfa. Flexitarian cliche chia duis bespoke, paleo 90's tofu irony adipisicing mlkshk tattooed lo-fi post-ironic jean shorts. Godard DIY fap sriracha art party. Keytar keffiyeh chia sapiente ex.</p>

      <p>Scenester XOXO do swag, lo-fi you probably haven't heard of them banjo gluten-free letterpress vegan church-key occaecat laboris Intelligentsia. Vice incididunt do, fanny pack mollit letterpress plaid assumenda bespoke. In assumenda keffiyeh tattooed, YOLO synth viral laborum organic cillum squid. Laborum cornhole est artisan incididunt narwhal tattooed whatever, art party culpa. Accusamus craft beer irony, labore lo-fi tempor laboris Portland messenger bag fap ethnic XOXO hoodie pour-over fingerstache. Ullamco seitan mustache, cornhole authentic duis banh mi eu chillwave mlkshk High Life kitsch brunch. Fap pop-up Pinterest XOXO, aesthetic small batch roof party shabby chic mlkshk mixtape Marfa keytar.</p>
      
    </article>

  </div>
  
</div>
              
            
!

CSS

              
                body {
  max-width: 1280px;
  margin: 0 auto;
  font-size: 1.25em;
  line-height: 1.75em;
  color: #384047;
  background: #384047;
  font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial;
  font-weight: 400;
  
}

img {
  
  width: 100%;
  
}

.container {
  margin: 0 auto;
  width: 95%;
  margin: 0 5% 0 0;
  position: relative;
  overflow: hidden;
}

a {
  text-decoration: none;
  font-weight: bold;
}

header {
    width: 5%;
    height: 100%;
    position: fixed;
    overflow: hidden;
    transition: .32s ease-out;
    z-index: 2;
    background: #384047;
}

header a, .navBtn {
  
  color: #fff;

}

.toggle {
    width: 312px;
}

.reveal {
    opacity: 1;
    left: 0;
}

nav {
    padding-left: 360px;
    overflow: hidden;
    position: absolute;
    transition: .3s ease-out;
    top: 80px;
    left: 0;
    width: 100%;
    opacity: 0;
    height: 100%;
}
    nav a {
        float: left;
        padding: 8px 0;
        opacity: .5;
        width: 100%;
        transition: .3s ease;
        font-size: 1em;
        text-transform: uppercase;
        font-weight: bold;
        line-height: 1.85em;
    }
        nav a:hover, .current, .toggle .navBtn {
            opacity: 1;
        }

    .toggle nav {
        padding-left: 60px;
        opacity: 1;
    }

.navBtn {
    font-size: 2em;
    font-weight: 700;
    margin: 30px 0 0;
    width: 100%;
    text-align: center;
    line-height: 1em;
    -webkit-transform:rotate(0deg);
    transition: .3s ease-out;
    display: block;
    cursor: pointer;
    position: absolute;
    z-index: 1000001;
    opacity: .5;
    left: 0;
}

    .toggle .navBtn{
        -webkit-transform:rotate(224deg); 
        color: #fff;
        left: -100px;
    }

.navBtn:hover {
    opacity: 1;
}

.main {
    background: #f6f6f6;
    float: right;
    width: 95%;
    margin: 0 0 0 5%;
    padding: 0;
    transition: .6s ease-in;
    overflow: hidden;
    z-index: 2;
}

h3 {
  font-size: 3em;
  color: #EAC734;
  font-weight: 300;
  transition: .6s ease-in;
  line-height: 1em;
}

article {
  padding: 40px 10%;
}

.push {
    margin-left: 240px;
    margin-right: -240px;
    transition: .3s ease-in;
}

.overlay {
    width: 100%;
    background: #384047;
    opacity: .85;
    z-index: 1;
    height: 100%;
    position: fixed;
    display: none;
}

.block {
    display: block;
}

/* 1024 */
@media only screen and (max-width: 1024px) {
    .container {
        width: 100%;
        margin: 0;
    }
    header {
        width: 8%;
    }
    .main {
      width: 92%;
    }
}

/* 768 */
@media only screen and (max-width: 768px) {
    header {
        width: 10%;
    }
    .main {
      width: 90%;
    }

}

/* 480 */
@media only screen and (max-width: 480px) {
    header {
        width: 10%;
    }
    .main {
      width: 90%;
    }
    h3 {
      font-size: 2em;

}

/* 320 */
@media only screen and (max-width: 320px) {
    header {
        width: 15%;
    }
    .main {
      width: 85%;
    }

}

              
            
!

JS

              
                $(document).ready(function () {	

  var toggleMenu = function() {
	  $('header').toggleClass('toggle');
	  $('.main').toggleClass('push');
	  $('.overlay').toggleClass('block');
	  $('#social, .logo').toggleClass('reveal');
  };

	//Nav
	$('.navBtn').click(function() {
    toggleMenu();
	});

  Mousetrap.bind('esc', function() {
    toggleMenu();
  });

});
              
            
!
999px

Console