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>
  <nav>
    <ul>
      <li><a href="">Articles</a></li>
      <li><a href="">Events</a></li>
      <li><a href="">Resources</a></li>
      <li><a href="">Contact me</a></li>
    </ul>
  </nav>

  <h1>Blog Posts</h1>
</header>

<main class="wrapper">
  <ul class="featured">
    <li>
      <div class="image">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/balloon-bg.jpg">
      </div>
      <div class="caption">
        <a href="">
          <h2>Balloons &amp; Airships</h2>
          <p>Read extracts from the book by Gertrude Bacon</p>
        </a>
      </div>

    </li>

    <li>
      <div class="image">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/gallery2.jpg">
      </div>
      <h2 class="caption"><a href="">Balloons I have seen</a></h2>

    </li>
    <li>
      <div class="image">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/gallery3.jpg">
      </div>
      <h2 class="caption"><a href="">Airships are quite good</a></h2>

    </li>

    <li>
      <div class="image">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/gallery4.jpg">
      </div>
      <h2 class="caption"><a href="">Things I like that are not balloons</a></h2>

    </li>

    <li>
      <div class="image">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/12005/gallery5.jpg">
      </div>
      <h2 class="caption"><a href="">A trip to the balloon fiesta</a></h2>

    </li>
  </ul>

  <div class="content">
    <article class="post">
      <h2>The Great Nassau Balloon</h2>
      <p>The most celebrated event in all his career, however, was the voyage of the Great Nassau Balloon, in November 1836. This voyage created a tremendous sensation at the time, and has always been considered one of the most adventurous enterprises in
        the whole history of aeronautics. How it came about was as follows:—</p>

      <p>The managers of the Vauxhall Gardens, London, had made, with Mr. Green’s assistance, a very large and fine balloon of crimson silk, which stood eighty feet high and held 90,000 cubic feet of gas, and which would carry, if needed, more than twenty
        persons. After it was made the proprietors proposed exhibiting it in Paris, and there was some46 question of how this valuable and fragile property had best be conveyed so far. Mr. Hollond, a young gentleman of considerable wealth, and a great
        lover of adventure, at once came forward, and proposed to take the balloon to the Continent by sky. His offer was accepted, and to make the ascent more noteworthy, it was decided to start from London and cross the sea by night, making as long
        a voyage as possible, although it was already winter time, and such a venture had never before been made.</p>
    </article>

    <aside class="side1">
      <p>This voyage created a tremendous sensation at the time!</p>
    </aside>
  </div>

</main>
              
            
!

CSS

              
                html {
  font: 1.1em/1.2 "Open Sans", sans-serif;
}

img {
  max-width: 100%;
}

body {
  margin: 0;
}

header {
  background-color: rgba(4, 15, 22, 1);
  color: rgba(251, 251, 255, 1);
}

header a {
  color: rgba(251, 251, 255, 1);
}

header nav {
  border-bottom: 1px solid rgba(251, 251, 255, 0.2);
}

header ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

header h1 {
  font: 200% Alegreya, serif;
  padding: 0.5rem 1rem;
  margin: 2rem 0 0 0;
}

nav a {
  display: block;
  padding: 0.5rem 1rem;
  border-right: 1px solid rgba(251, 251, 255, 0.2);
  text-decoration: none;
  transition: all 0.8s;
}

nav a:hover {
  background-color: rgba(251, 251, 255, 0.2);
}

.featured {
  list-style: none;
  margin: 0;
  padding: 0;
  background-color: rgba(4, 15, 22, 1);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 250px 250px;
  grid-gap: 1px;
}

.featured li {
  background-color: rgba(251, 251, 255, 1);
  display: grid;
  grid-template-rows: 1fr minmax(5em, auto);
}

.featured .image {
  grid-row: 1 / 3;
  grid-column: 1;
}

.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured .caption {
  background-color: rgba(4, 15, 22, 0.6);
  color: rgba(251, 251, 255, 1);
  grid-row: 2;
  grid-column: 1;
}

.caption a {
  color: rgba(251, 251, 255, 1);
  text-decoration: none;
  display: block;
  padding: 0.5rem;
}

.featured li h2 {
  font-size: 1.4rem;
  font-family: Alegreya, serif;
  margin: 0;
}

.featured li p {
  margin: 0.5rem 0 0 0;
}

.content {
  margin-top: 40px;
  display: grid;
  grid-gap: 5%;
  grid-template-columns: 10px 3fr 1fr 10px;
  grid-template-rows: 10em auto;
}

.post {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .side1 {
    grid-column: 3;
    grid-row: 2;
  }

.featured li:first-child {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
              
            
!

JS

              
                
              
            
!
999px

Console