cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <nav>
    <ul>
      <li><a href="/"><span class="fa fa-home fa-3x" aria-hidden="true"></span> Home</a></li>
      <li><a href="#"><span class="fa fa-wrench fa-3x" aria-hidden="true"></span> Services</a></li>
      <li><a href="#"><span class="fa fa-user fa-3x" aria-hidden="true"></span> About</a></li>
      <li><a href="#"><span class="fa fa-envelope fa-3x" aria-hidden="true"></span> Contact</a></li>
    </ul>
</nav>
<header>
  <h1>
    F 
    <div>Fantastic</div>
  </h1>
</header>
<main>
  <section>
    <h2>Fantastic Column 1</h2>
    <div>
      <img src="https://unsplash.it/1500/1000?image=1022" alt="northern lights">
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </div>
  </section>
  <section>
    <h2>Fantastic Column 2</h2>
    <div>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      <img src="https://unsplash.it/g/1500/1000/?image=0" alt="open laptop on desk">
    </div>
  </section>
  <section>
    <h2>Fantastic Column 3</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  </section>
</main>
<aside>
  <h2>Aside</h2>
  <ul>
    <li>Fantastic Link 1</li>
    <li>Fantastic Link 2</li>
    <li>Fantastic Link 3</li>
    <li>Fantastic Link 4</li>
  </ul>
</aside>
<footer>
  <ul>
    <li><a href="#"><span class="fa fa-github fa-3x" aria-hidden="true"></span> Github</a></li>
    <li><a href="#"><span class="fa fa-linkedin fa-3x" aria-hidden="true"></span> LinkedIn</a></li>
    <li><a href="#"><span class="fa fa-twitter fa-3x" aria-hidden="true"></span> Twitter</a></li>
  </ul>
  <p>Hand-coded by Amy Carney</p>
  <p><a href="https://www.smashingmagazine.com/2017/09/the-css-grid-challenge-join-in/">2017 Smashing Magazine CSS Grid Challenge</a></p>
</footer>
            
          
!
            
              /* base elements for all devices and browsers */
body {
  max-width: 60em;
  margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  padding: .25em;
}
p, ul, ol, dl, li, a, img {
  padding: .25em;
}
h2 {
  border-bottom: 2px double #333;
  text-transform: uppercase;
}
li {
  line-height: 1.5;
}
img {
  padding: .25em;
  max-width: 98%;
}

header {
  background:
linear-gradient(135deg, #bada55 22px, #333 22px, #333 24px, transparent 24px, transparent 67px, #333 67px, #333 69px, transparent 69px),
linear-gradient(225deg, #bada55 22px, #333 22px, #333 24px, transparent 24px, transparent 67px, #333 67px, #333 69px, transparent 69px)0 64px;
  background-color:#bada55;
  background-size: 64px 128px;
  padding-bottom: 2em;
  h1 {
    color: #f5f5f5;
    font-size: 7em;
    text-align: center;
    text-shadow: 5px 5px 5px #333;
    div {
      font-size: .3em;
      font-weight: lighter;
    }
  }
}

nav {
  background-color: #333;
  bottom: 0;
  color: #f5f5f5;
  display: flex;
  justify-content: center;
  min-width: 100%;
  position: fixed;
  right: 0;
  ul {
    display: flex;
    list-style-type: none;
    li {
      padding: 0 .8em;
      a {
        color: #fff;
        text-decoration: none;
        &:before {
          content: ' ';
        }
      }
    }
  }
}
main {
  background-color: #f5f5f5;
}
aside {
  background-color: orange;
  text-align: center;
  ul {
    li {
      list-style-type: none;
      padding: 1em;
    }
  }
}
footer {
  background-color: #4286f4;
  color: #fff;
  font-weight: bold;
  padding: .5em .25em 6em .25em;
  text-align: center;
  ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    li {
      margin: 0 .8em;
    }
  }
  a {
    color: inherit;
  }
}

/* patterns */

.visability-hidden {
  border:0;
  clip:rect(0,0,0,0);
  height:1px;
  margin:-1px;
  overflow:hidden;
  padding:0;
  position:absolute;
  width:1px;
}

/* base for larger screens */
@media screen and (min-width: 40em) {
  h1 {
    font-size: 150%;
  }
  p {
    padding: .5em 1em;
  }
  nav {
    justify-content: center;
  }
  aside {
    padding: 1em 2em;
  }
  footer {
    padding: 2em;
  }
}

/* add grid, if supported */

@supports (grid-area: auto) {
  
  body {
    display: grid;
    display: -ms-grid;
    grid-template-areas:
      "masthead"
      "main"
      "sidebar"
      "footer";
    max-width: none;
  }
  header {
    grid-area: masthead;
    height: 100vh;
  }
  main {
    grid-area: main;
  }
  aside {
    grid-area: sidebar;
  }
  footer {
    grid-area: footer;
  }
  
  /* medium screen sizes */
  @media screen and (min-width: 38em) and (max-width: 58.9em) {
    body {
      grid-template-columns: 70% 30%;
      grid-template-areas:
        "nav nav"
        "masthead masthead"
        "main sidebar"
        "footer footer";
      -ms-grid-columns: 2;
      -ms-grid-rows: 4;
    }
    nav {
      grid-area: nav;
      position: inherit;
      -ms-grid-row: 1;
    }
    header {
      grid-area: masthead;
      -ms-grid-row: 2;
    }
    main {
      grid-area: main;
      -ms-grid-column: 1;
      -ms-grid-row: 3;
    }
    aside {
      grid-area: sidebar;
      -ms-grid-column: 2;
      -ms-grid-row: 3;
    }
    footer {
      grid-area: footer;
      -ms-grid-row: 4;
    }
  } /* end medium screen media */
  
  @media screen and (min-width: 59em) {
    body {
      display: grid;
      grid-template-areas:
        "nav nav nav"
        "masthead masthead ."
        "main main sidebar"
        "footer footer footer";
    }
    nav {
      display: inherit;
      grid-area: nav;
      grid-template-columns: 40% 60%;
      position: inherit;
      -ms-grid-row: 1;
    }
    header {
      grid-area: masthead;
      -ms-grid-row: 2;
    }
    main {
      grid-area: main;
      -ms-grid-row: 3;
      -ms-grid-column: 1/2;
    }
    section {
      div {
        display: inherit;
        grid-template-columns: 30% 70%;
      }
    }
    aside {
      grid-area: sidebar;
      -ms-grid-row: 3;
      -ms-grid-column: 3;
    }
    footer { 
      grid-area: footer;
      -ms-grid-row: 4;
    }
  } /* end larger screen media */
  
} /* end supports */
            
          
!
999px
Loading ..................

Console