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

              
                <header id="masthead" class="masthead">
  <div id="masthead__content" class="masthead__content">
    <span class="masthead__logo">Lorem Ipsum</span> 
    <div class="masthead__buttons">
      <a class="masthead__search" href="/search">Search</a>
      <div class="masthead__menu"></div>
    </div>
  </div>
</header>
<main id="article">
  <div id="article__left-sidebar" class="left-sidebar">
    <button class="audio-widget"></button>
    <span class="audio-widget-caption">0:48</span>
    <ul class="left-sidebar__links">
      <li><a class="left-sidebar__link" href="#">Facebook</a></li>
      <li><a class="left-sidebar__link" href="#">Twitter</a></li>
      <li><a class="left-sidebar__link" href="#">Email</a></li>
    </ul>
  </div>
  <article id="article__body" class="prose">
    <h2>Lorem ipsum dolor sit amet</h2>
    <figure>
      <img src="http://via.placeholder.com/720x480">
      <figcaption>
        Lorem ipsum dolor sit amet.
      </figcaption>
    </figure>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi auctor, urna sagittis sollicitudin sollicitudin, neque ipsum volutpat arcu, et laoreet ex ipsum id nisl. Suspendisse congue massa ante, eget maximus velit rutrum ac. Aenean ullamcorper lorem leo. Sed auctor mi eget velit tempor scelerisque. Quisque eget sapien massa. Praesent faucibus neque enim, fermentum viverra massa mattis non. Sed sit amet accumsan nisi, id ultrices nunc. Integer congue varius gravida. Nullam nec lacus quis ligula auctor dapibus.</p>
    <aside id="article__banner-a--mobile" class="banner banner--small"></aside>
    <p>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer fermentum nunc a pretium semper. Sed elementum sodales turpis, vitae euismod sem dignissim pellentesque. Cras condimentum elit et libero consequat, id sollicitudin justo pretium. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam tristique sem et dignissim ultricies. Nam iaculis volutpat est, sed congue erat viverra non.</p>
    <blockquote>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi auctor, urna sagittis sollicitudin sollicitudin, neque ipsum volutpat arcu, et laoreet ex ipsum id nisl.
    </blockquote>
    <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec gravida maximus sagittis. Donec rhoncus sem ut lorem condimentum eleifend. Praesent at tempus risus, nec dapibus nulla. Etiam vel ornare felis, vitae lobortis enim. Pellentesque et est nec lorem faucibus feugiat. Etiam vel euismod mauris, eu consequat massa. Curabitur suscipit volutpat massa a egestas. Morbi aliquam faucibus erat, ut lobortis elit aliquam nec. Praesent maximus fermentum nibh, nec commodo turpis porttitor sed. Fusce aliquet fermentum tristique. Integer eleifend rhoncus arcu. Suspendisse potenti. Maecenas pharetra nunc vitae erat posuere, sed tempor dolor interdum.</p>
    <figure class="prose__element--float-right">
      <img src="http://via.placeholder.com/480x720">
      <figcaption>
        Lorem ipsum dolor sit amet.
      </figcaption>
    </figure>
    <p>Vestibulum consectetur ex quis ornare dapibus. Vestibulum vel sapien sit amet massa laoreet commodo. Aliquam faucibus, risus sed tincidunt ornare, tortor urna consequat ligula, quis lobortis mauris ligula et arcu. Nullam in arcu euismod, porta tortor eu, volutpat velit. Nulla eu metus vitae ligula pulvinar egestas molestie porttitor nisl. Praesent lobortis nec nulla et facilisis. Aenean et nisi diam. Donec dapibus orci sit amet metus facilisis cursus. Nulla sit amet nulla sodales lorem tristique venenatis. Morbi at ex tortor. Pellentesque ultricies nulla quis justo dapibus tincidunt. Donec lacus nibh, varius eget tempus at, imperdiet et odio.</p>
    <aside id="article__banner-b--mobile" class="banner banner--large"></aside>
    <p>Mauris rutrum, risus eget egestas commodo, odio ante ullamcorper magna, sit amet lobortis dui velit et mauris. Quisque euismod magna in elit porta tempor. Nulla posuere quis odio vitae convallis. In vitae rhoncus ante. Suspendisse posuere arcu ac magna gravida varius. Quisque velit massa, pretium et neque mattis, pharetra luctus tellus. Quisque eget tortor suscipit tellus molestie aliquam. Nulla facilisi. Proin eu felis eget orci lobortis porttitor.</p>
  </article>
  <div id="article__right-sidebar" class="right-sidebar">
    <aside id="article__banner-a" class="banner banner--small"></aside>
    <hr class="rule">
    <aside id="article__banner-b" class="banner banner--large"></aside>
    <hr class="rule">
    <aside class="content-cluster">
      <h4 class="content-cluster__heading">Lorem ipsum dolor sit amet</h4>
      <ul class="content-cluster__list">
        <li class="content-cluster__item">
          <img class="content-cluster__item__thumb" src="http://via.placeholder.com/72x60">
          <span class="content-cluster__item__headline">
            Lorem ipsum dolor sit amet
          </span>
        </li>
        <li class="content-cluster__item">
          <img class="content-cluster__item__thumb" src="http://via.placeholder.com/72x60">
          <span class="content-cluster__item__headline">
            Lorem ipsum dolor sit amet
          </span>
        </li>
        <li class="content-cluster__item">
          <img class="content-cluster__item__thumb" src="http://via.placeholder.com/72x60">
          <span class="content-cluster__item__headline">
            Lorem ipsum dolor sit amet
          </span>
        </li>
        <li class="content-cluster__item">
          <img class="content-cluster__item__thumb" src="http://via.placeholder.com/72x60">
          <span class="content-cluster__item__headline">
            Lorem ipsum dolor sit amet
          </span>
        </li>
      </ul>
    </aside>
    <aside class="content-cluster">
      <h4 class="content-cluster__heading">Lorem ipsum dolor sit amet</h4>
      <ul class="content-cluster__list">
        <li class="content-cluster__item">
          <img class="content-cluster__item__thumb" src="http://via.placeholder.com/72x60">
          <span class="content-cluster__item__headline">
            Lorem ipsum dolor sit amet
          </span>
        </li>
        <li class="content-cluster__item">
          <img class="content-cluster__item__thumb" src="http://via.placeholder.com/72x60">
          <span class="content-cluster__item__headline">
            Lorem ipsum dolor sit amet
          </span>
        </li>
        <li class="content-cluster__item">
          <img class="content-cluster__item__thumb" src="http://via.placeholder.com/72x60">
          <span class="content-cluster__item__headline">
            Lorem ipsum dolor sit amet
          </span>
        </li>
        <li class="content-cluster__item">
          <img class="content-cluster__item__thumb" src="http://via.placeholder.com/72x60">
          <span class="content-cluster__item__headline">
            Lorem ipsum dolor sit amet
          </span>
        </li>
      </ul>
    </aside>
  </div>
</main>
<footer id="footer" class="footer">
  <span class="footer__text">
    &copy; 1924 Lorem Ipsum Inc.  All rights reserved.
  </span>
</footer>
              
            
!

CSS

              
                /* BASIC VALUES */
/* base units */
/* 
margin: 15px
col: 72px
gutter: 42px
row: 30px
*/
/* media sizes & breakpoints */
/*
media-mobile:  456px
breakpoint-xs: media-mobile + (margin * 2)
media-tablet:  870px
breakpoint-sm: media-tablet + (margin * 2)
media-desktop: 1026px
breakpoint-md: media-desktop + (margin * 2)
media-wide:    1326px
breakpoint-lg: media-wide + (margin * 2)
*/



/* app/styles/application.css */
body {
  padding: 0;
  margin: 0;
}
a {
  color: dimgray;
}
a:hover {
  color: silver;
}
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, Times, "Times New Roman", serif;
}
#masthead__content {
  margin: 0 auto;
  width: 1326px; /* media-wide */
}
#footer {
  height: 100px;
  width: 100%;
}



/* app/styles/article.css */
#article {
  margin: 0 auto;
  margin-top: 30px; /* row */
  margin-bottom: 60px; /* row * 2 */
  overflow: hidden;
  width: 1326px; /* media-wide */
}
#article__banner-a--mobile, #article__banner-b--mobile {
  display: none;
}
#article__banner-a--mobile {
  margin: 0 auto;
}
#article__left-sidebar {
  float: left;
  margin-right: 42px; /* gutter */
  width: 72px; /* col */
}
#article__body {
  float: left;
  width: 642px; /* (col * 6) + (gutter * 5) */
}
#article__right-sidebar {
  float: left;
  margin-left: 156px; /* col + (gutter * 2) */
  width: 300px; /* (col * 3) + (gutter * 2) */
}
@media(max-width: 1356px) { /* breakpoint-lg */
  #article, #masthead__content {
    width: 1026px; /* media-desktop */
  }
  #article__body {
    width: 570px; /* (col * 5) + (gutter * 5) */
  }
  #article__right-sidebar {
    float: left;
    margin-left: 42px; /* gutter */
  }
}
@media(max-width: 1056px) { /* breakpoint-md */
  #article, #masthead__content {
    margin-top: 15px; /* row / 2 */
    width: 870px; /* media-tablet */
  }
  #article__body {
    width: 756px; /* (col * 5) + (gutter * 5) */
  }
  #article__right-sidebar {
    clear: both;
    margin-left: 114px; /* col + gutter */
    width: 756px;
  }
  #article__banner-a, #article__banner-b {
    display: none;
  }
  #article__banner-a--mobile, #article__banner-b--mobile {
    display: block;
  }
}
@media(max-width: 900px) { /* breakpoint-sm */
  #article, #masthead__content {
    width: 456px;
  }
  #article__left-sidebar {
    display: none;
  }
  #article__body {
    width: 456px; /* (col * 5) + (gutter * 5) */
  }
  #article__right-sidebar {
    margin-left: 0;
    width: 456px;
  }
}
@media(max-width: 486px) { /* breakpoint-xs */
  #article, #masthead__content {
    width: 100%;
  }
  #masthead__content {
    margin-left: 15px;
    margin-right: 15px;
  }
  #article__body, #article__right-sidebar {
    margin-left: 15px;
    margin-right: 15px;
    width: auto;
  }
}



/* app/styles/components/audio-widget */
.audio-widget {
  background: dimgray;
  border-radius: 50%;
  border: none;
  display: block;
  height: 60px;
  transition: background 0.5s ease;
  width: 60px;
}
.audio-widget:hover {
  background: silver;
  cursor: pointer;
}
.audio-widget:after {
  border-color: white;
  border-bottom-color: transparent;
  border-style: solid;
  border-top-color: transparent;
  border-width: 11px 0 11px 22px;
  content: " ";
  display: block;
  height: 0;
  position: absolute;
  transform: translate(70%, -50%);
  width: 0;
}
.audio-widget-caption {
  display: inline-block;
  font-family: sans-serif;
  font-size: 14px;
  margin-top: 10px;
  margin-bottom: 30px; /* row */
  text-align: center;
  width: 60px;
}



/* app/styles/components/banner.css */
.banner {
  background: lightgray;
}
.banner--small {
  height: 50px;
  width: 300px;
}
.banner--large {
  height: 250px;
  width: 300px;
}



/* app/styles/components/content-cluster */
.content-cluster__list {
  padding-left: 0px;
}
.content-cluster__item {
  margin-bottom: 30px;
  overflow: hidden;
}
.content-cluster__item__thumb {
  float: left;
  margin-right: 15px;
}
.content-cluster__item__headline {
  float: left;
}



/* app/styles/components/footer */
.footer {
  align-items: center;
  color: white;
  display: flex;
  font-family: sans-serif;
  justify-content: center;
  background: dimgray;
}



/* app/styles/components/left-sidebar.css */
.left-sidebar__links {
  list-style: none;
  padding-left: 0;
}
.left-sidebar__link {
  display: block;
  margin-bottom: 15px;
}



/* app/styles/components/masthead */
.masthead {
  align-items: center;
  display: flex;
  background: white;
  border-bottom: 1px solid lightgray;
  height: 50px;
}
.masthead__content {
  display: flex;
  justify-content: space-between;
}
.masthead__logo {
  font-size: 20px;
  font-weight: 800;
}
.masthead__buttons {
  align-items: center;
  display: flex;
  justify-content: space-between;
  width: 120px;
}
.masthead__menu, .masthead__menu:before, .masthead__menu:after {
  content: '';
  display: block;
  background: black;
  border-radius: 20%;
  height: 4px;
  width: 35px;
}
.masthead__menu:before {
  transform: translateY(8px);
}
.masthead__menu:after {
  transform: translateY(-12px);
}



/* app/styles/components/prose */
.prose {
  line-height: 30px;
}
.prose .prose__element--float-left {
  float: left;
  margin-right: 45px; /* gutter */
  width: 35%;
}
.prose .prose__element--float-right {
  float: right;
  margin-left: 45px; /* gutter */
  width: 35%;
}
.prose blockquote {
  border-left: 3px solid orange;
  padding-left: 30px;
}
.prose figure {
  margin: 0;
  margin-bottom: 30px; /* row */
}
.prose figure img {
  height: auto;
  max-width: 100%;
}
.prose figure figcaption {
  font-size: 12px;
  font-family: Helvetica, Arial, Sans-Serif;;
}



/* app/styles/components/rule.css */
.rule {
  background: lightgray;
  border: 0;
  height: 1px;
  margin-bottom: 30px; /* row */
  margin-top: 30px; /* row */
}


              
            
!

JS

              
                
              
            
!
999px

Console