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>
  <h1 class="logo">Jayman Pandya</h1>
  <nav>
    <li>navText</li>
    <li>navText</li>
    <li>navText</li>
    <li>navText</li>
  </nav>
</header>
<section class="contentArea">
  <h2 class="sectionTitle">Home</h2>
  <article>
    <h1 class="articleTitle">Understanding Grid Template Areas</h1>
    <p class="excerpt">Sed egestas, ante et vulputate volutpat, eros pede semper est, vitae luctus metus libero eu augue. Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis. Vestibulum volutpat, lacus a ultrices sagittis, mi neque euismod dui, eu pulvinar nunc sapien ornare nisl. Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p>
  </article>
  <article>
    <h1 class="articleTitle">Understanding Grid Template Areas</h1>
    <p class="excerpt">Sed egestas, ante et vulputate volutpat, eros pede semper est, vitae luctus metus libero eu augue. Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis. Vestibulum volutpat, lacus a ultrices sagittis, mi neque euismod dui, eu pulvinar nunc sapien ornare nisl. Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p>
  </article>
  <article>
    <h1 class="articleTitle">Understanding Grid Template Areas</h1>
    <p class="excerpt">Sed egestas, ante et vulputate volutpat, eros pede semper est, vitae luctus metus libero eu augue. Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis. Vestibulum volutpat, lacus a ultrices sagittis, mi neque euismod dui, eu pulvinar nunc sapien ornare nisl. Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p>
  </article>
</section>
<section class="sideBar">
  <h2 class="sectionTitle">Sidebar</h2>
  <section class="recentItems">
    <nav>
      <li><a href="#">RecentItems</a></li>
      <li><a href="#">RecentItems</a></li>
      <li><a href="#">RecentItems</a></li>
      <li><a href="#">RecentItems</a></li>
    </nav>
  </section>
</section>
<footer>
  <nav>
    <li><a href="#">navItems</a></li>
    <li><a href="#">navItems</a></li>
    <li><a href="#">navItems</a></li>
    <li><a href="#">navItems</a></li>
  </nav>
</footer>
              
            
!

CSS

              
                body {

  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas :
    "header header header header"
    "contentArea contentArea contentArea sideBar"
    "footer footer footer footer";
  justify-content: center;
} 

header {
  grid-area: header;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
}
.contentArea {
  grid-area: contentArea;
}
.sideBar {
  grid-area: sideBar;
}
footer {
  grid-area: footer;
}

.logo {
  grid-column: span 2;
}
header nav, footer nav {
  grid-column: span 4;
  list-style-type: none;
  list-style-position: outside;
  padding-left: 0;
  justify-content: end;
  display: grid;
  grid-template-columns: repeat(4, 150px);
  grid-gap: 10px;
}

footer nav {
  justify-content: center;
}

header nav li {
  grid-column: auto;
  justify-self: end;
}
              
            
!

JS

              
                
              
            
!
999px

Console