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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              <div id="wrapper">
  <header id="main-header">
    <div id="header-top">
      <h1 id="main-logo">COMPANY</h1>
      <ul class="social-media">
      <li class="facebook"><i class="fa fa-facebook"></i></li>
      <li class="twitter"><i class="fa fa-twitter"></i></li>
      <li class="instagram"><i class="fa fa-instagram"></i></li>
      <li class="youtube"><i class="fa fa-youtube"></i></li>
    </ul>
    </div>
  </header>
  <nav id="main-nav">
    <a href="#">Home</a>
    <a href="#">Contact</a>
    <a href="#">Blog</a>
    <a href="#">About Us</a>
    <a href="#">Help</a>
  </nav>
  <div id="sidebar1">
    <h2 class="sidebar-heading">Popular</h2>
    <article class="popular-article">
      <img src="http://lorempixel.com/320/200/city/1" alt="" class="preview">
      <h3 class="title">Cupiditate Maxime</h3>
      <p class="date">October 1, 2015</p>
    </article>
    <article class="popular-article">
      <img src="http://lorempixel.com/320/200/city/2" alt="" class="preview">
      <h3 class="title">Blanditiis Maiores</h3>
      <p class="date">March 5, 2017</p>
    </article>
    <article class="popular-article">
      <img src="http://lorempixel.com/320/200/city/3" alt="" class="preview">
      <h3 class="title">Fuga Fugit Dolores</h3>
      <p class="date">July 31, 2016</p>
    </article>
    <article class="popular-article">
      <img src="http://lorempixel.com/320/200/city/4" alt="" class="preview">
      <h3 class="title">Excepturi Commodi Totam</h3>
      <p class="date">January 11, 2017</p>
    </article>
  </div>
  <div id="feature-articles">
    <article id="feature">
      <img src="http://lorempixel.com/560/600/city/6" alt="">
      <div class="feature-text">
        <h2>Quidem Consequuntur Soluta Nesciunt</h2>
      </div>
      
    </article>
    <article class="article">
      <img src="http://lorempixel.com/560/300/city/3" alt="">
      <h3 class="feature-text">Ad Explicabo Impedit Iusto Reiciendis</h3>
    </article>
    <article class="article">
      <img src="http://lorempixel.com/560/300/city/4" alt="">
      <h3 class="feature-text">Voluptatibus at Temporibus Saepe Accusamus Amet!</h3>
    </article>
  </div>
  <div id="sidebar2">
    <h2 class="sidebar-heading">Recent</h2>
    <ul id="recent-posts">
      <li>
        <div class="post-img">
          <img src="http://lorempixel.com/100/100/people/1" alt="">
        </div>
        <div class="post-info">
          <h3>Saepe Ullam Voluptas Nihil Fugit Optio!</h3>
          <span class="date">Tuesday</span>
        </div>
      </li>
      <li>
        <div class="post-img">
          <img src="http://lorempixel.com/100/100/people/3" alt="">
        </div>
        <div class="post-info">
          <h3>Inventore Labore Et Qui Rerum Quidem</h3>
          <span class="date">Last Week</span>
        </div>
      </li>
      <li>
        <div class="post-img">
          <img src="http://lorempixel.com/100/100/people/4" alt="">
        </div>
        <div class="post-info">
          <h3>Soluta Deleniti Blanditiis Neque Mollitia</h3>
          <span class="date">2 Weeks Ago</span>
        </div>
      </li>
    </ul>
  </div>
  <footer id="main-footer">
    &copy;copyright 2017, Company Industries, Inc.
  </footer>  
</div>

            
          
!

CSS

            
              * { box-sizing: border-box; }
body, html { margin: 0; font-family: Arial, sans-serif; }
h1,h2,h3,h4,h5,h6,p {
  font-family: 'Arial Narrow', sans-serif;
  margin: 0;
}
p { margin-bottom: 20px;}

#wrapper {
  display: grid;
  grid-gap: 14px;
  grid-template-columns: 2fr 23fr 50fr 23fr 2fr;
  grid-template-rows: auto;
  grid-template-areas:
    "header header header header header"
    ". . main-nav . ."
    ". sidebar1 feature-articles sidebar2 ."
    "footer footer footer footer footer"
}

#main-header {
  grid-area: header;
  background-color: #111;
  color: #fff;
  padding: 0 2%;
}

#main-logo {
  color: #F2AB27;
  font-family: 'Arial Black', 'Arial Narrow', sans-serif;
  font-size: 36px;
}

#header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: auto 14px;
}

.social-media { padding-left: 0; }
.social-media li {
  display: inline-block;
  font-size: 20px;
  background-color: #242424;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  text-align: center;
  line-height: 40px;
  margin-left: 10px;
}

#main-nav {
  grid-area: main-nav;
  display: flex;
  justify-content: space-between;
}

#main-nav a {
  color: #999;
  text-decoration: none;
  text-transform: uppercase;
  font-family: 'Arial Narrow', Arial;
  font-weight: bold;
}

#sidebar1 {
  grid-area: sidebar1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.popular-article img {
  width: 100%;
}

#sidebar2 {
  grid-area: sidebar2;
}

.sidebar-heading {
  background-color: #F2134F;
  border-bottom: 4px solid #8C061E;
  width: 100%;
  color: #fff;
  margin: 0 auto;
  margin-bottom: 10px;
  padding: 5px;
  font-size: 16px;
  text-transform: uppercase;
  text-align: center;
}

#feature-articles {
  grid-area: feature-articles;
}

#feature-articles article {
  position: relative;
  margin-bottom: 20px;
}

#feature-articles article img {
  width: 100%;
}

#feature h2 {
  font-family: 'Arial Narrow', Arial;
  font-size: 32px;
}

#feature-articles article .feature-text {
  position: absolute;
  bottom: 0;
  color: #fff;
  padding: 10px;
  text-shadow: 2px 2px 0 #000;
}

#recent-posts {
  list-style: none;
  padding-left: 0;
}

#recent-posts li {
  display: flex;
  margin-bottom: 14px;
}

.post-img { flex: 1; }

#recent-posts .post-img img { width: 100%; }

#recent-posts .post-info {
  flex: 2;
  padding-left: 10px;
}

#recent-posts .post-info h3 {
  font-size: 12px;
}

#recent-posts .post-info .date {
  font-size: 10px;
  font-weight: normal;
}

.date {
  margin-top: 4px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  color: #aaa;
}

#main-footer {
  grid-area: footer;
  background-color: #222;
  color: #999;
  font-size: 10px;
  padding: 20px;
  text-align: center;
}
            
          
!

JS

            
              
            
          
!
999px

Console