123

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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.

            
              <header class="header" role="banner">
    <h1 class="page-title">
      <a href="#">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/knowledge-space.svg" alt="">
        <span><strong>Knowledge</strong> Space</span>
      </a>
    </h1>
  </header>

  <article class="hero">
    <div class="container hero__wrapper">
      <ul class="tags">
        <li class="tags__item"><a href="#">web design</a></li>
        <li class="tags__item"><a href="#">frontend</a></li>
        <li class="tags__item"><a href="#">css</a></li>
      </ul>
      <h2 class="hero__title">Comprehensive Guide to Build Dynamic and Resizable Components in CSS</h2>
      <div class="bio">
        <img class="bio__avatar" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/shadeed.jpg" alt="">
        <div class="bio__meta">
          By: <strong>Ahmad Shadeed</strong>
          <time>Published on August 5, 2016</time>
        </div>
      </div>
    </div>
  </article>

  <div class="container">
    <div class="layout">
      <main class="layout__item layout__item--primary" role="main">
        <section class="section">
          <h2 class="section__title">
            <span>Course Outline</span>
          </h2>

          <div class="section__content">
            <ul class="list">
              <li class="list__item">
                <span>What is the difference between EM, REM and PX units?</span>
                <ul>
                  <li class="list__subitem">Sub point example</li>
                  <li class="list__subitem">Sub point example</li>
                  <li class="list__subitem">Sub point example</li>
                </ul>
              </li>
              <li class="list__item">How we can get benefit from using EM and REM?</li>
              <li class="list__item">Different examples and use cases for EM based components.</li>
            </ul>
          </div>
        </section>

        <section class="section">
          <h2 class="section__title">
            <span>Course Registeration</span>
          </h2>

          <div class="section__content">
            <form class="form" action="">
              <p class="form__item">
                <label for="name">Full Name:</label>
                <input type="text" id="name" aria-required="true" required placeholder="John Smith">
              </p>
              <p class="form__item">
                <label for="email">Email Address:</label>
                <input type="email" id="email" aria-required="true" required placeholder="mail@example.com">
              </p>
              <p>
                <button class="button">Register</button>
              </p>
            </form>
          </div>
        </section>

        <section class="section">
          <h2 class="section__title">
            <span>Student Feedback</span>
          </h2>

          <div class="section__content">
            <blockquote class="quote">
              <p>One of the best courses I’ve ever watched. Highly recommended and you will be happy by the result. The instructor
                teaches in a way that is very easy and awesome. - John Smith</p>
            </blockquote>
          </div>
        </section>
      </main>
      <aside class="layout__item layout__item--aside" role="complementary">
        <section class="section">
          <h2 class="section__title section__title--sub"><span>Featured Students</span></h2>

          <div class="section__content">
            <ul>
              <li>
                <a href="#">
                  <div class="bio">
                    <img class="bio__avatar" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/shadeed.jpg" alt="">
                    <div class="bio__meta">
                      Ahmad Shadeed
                      <span>32 points</span>
                    </div>
                  </div>
                </a>
              </li>
              <li>
                <a href="#">
                  <div class="bio">
                    <img class="bio__avatar" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/shadeed.jpg" alt="">
                    <div class="bio__meta">
                      Ahmad Shadeed
                      <span>32 points</span>
                    </div>
                  </div>
                </a>
              </li>
              <li>
                <a href="#">
                  <div class="bio">
                    <img class="bio__avatar" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/shadeed.jpg" alt="">
                    <div class="bio__meta">
                      Ahmad Shadeed
                      <span>32 points</span>
                    </div>
                  </div>
                </a>
              </li>
            </ul>
          </div>
        </section>
      </aside>
    </div>
  </div>
<footer role="contentinfo">
<div>Demo logo made by <a href="http://www.flaticon.com/authors/zlatko-najdenovski" title="Zlatko Najdenovski">Zlatko Najdenovski</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div>
</footer>
            
          
!
            
              .visually-hidden {
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); }

html,
body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
a,
abbr,
img,
small,
strong,
ol,
ul,
li,
form,
label,
article,
aside,
footer,
header {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline; }

ol,
ul,
li {
  list-style: none; }

li {
  margin-bottom: 1em; }

html {
  box-sizing: border-box; }

*,
*:before,
*:after {
  box-sizing: inherit;
  -moz-box-sizing: border-box; }

a {
  text-decoration: none;
  color: inherit; }

button,
input,
textarea {
  color: inherit;
  font-style: inherit;
  font-weight: inherit; }

strong {
  font-weight: 700; }

input {
  appearance: none; }

body {
  font-family: 'Source Sans Pro', sans-serif; }

body {
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; }

.container {
  position: relative;
  max-width: 73.125em;
  padding-left: 1em;
  padding-right: 1em;
  margin-left: auto;
  margin-right: auto; }
  .container:after {
    content: '';
    display: block;
    clear: both; }

@media (min-width: 75em) {
  .container {
    padding-left: 0;
    padding-right: 0; } }
.header {
  background: #5066C2;
  text-align: center; }

/*------------------------------------*\
    footer
\*------------------------------------*/
.section {
  padding-top: 1em;
  padding-bottom: 1em; }

.section__title {
  border-bottom: 1px solid #d4d4d4;
  font-size: 1.25em;
  color: #5066C2;
  font-weight: 700;
  margin-bottom: 0.85em; }
  .section__title span {
    display: inline-block;
    background: linear-gradient(#5066C2, #5066C2) repeat-x;
    background-size: 100% 3px;
    background-position: bottom center;
    padding: 0.5em 0.875em; }
  .section__title--sub {
    color: #4a4a4a;
    border-bottom: 0; }
    .section__title--sub span {
      background-size: 0; }

@media (min-width: 55em) {
  .section__content {
    padding-right: 2em; } }
.layout__item--aside .section__content {
  padding-left: 1em;
  padding-right: 1em; }

.form__item {
  margin-bottom: 1em; }
  .form__item label {
    display: block;
    margin-bottom: 0.35em; }
  .form__item input {
    border: 2px solid #B4B4B4;
    padding: 0.75em 0.5em;
    font-size: 16px;
    border-radius: 0.25em;
    width: 100%;
    max-width: 25em; }
    .form__item input:focus {
      outline: 0;
      border-color: #5066C2;
      box-shadow: 0 0 0.3125em 0.125em rgba(80, 102, 194, 0.5); }

@media (min-width: 55em) {
  .layout__item {
    float: left; } }

.layout__item--aside {
  background: #fbfbfb;
  border-left: 1px solid #d9D9d9;
  border-right: 1px solid #d9D9d9; }

@media (min-width: 55em) {
  .layout {
    display: flex; }

  .layout__item--primary {
    width: 70%; }

  .layout__item--aside {
    width: 30%; } }
.page-title {
  font-size: 1.15rem;
  color: #fff; }
  .page-title a {
    display: inline-block;
    border-bottom: 0.25em solid rgba(0, 0, 0, 0.15);
    padding-bottom: 0.25em;
    padding-top: 0.35em; }
  .page-title img {
    display: inline-block;
    vertical-align: middle;
    width: 2.1875em;
    height: 2.375em; }
  @media (min-width: 55em) {
    .page-title {
      font-size: 1.5rem; } }

.hero {
  background: #f4f4f4;
  border-bottom: 1px solid #d9d9d9;
  padding-top: 2em;
  padding-bottom: 2em; }

.hero__wrapper > *:not(:last-child) {
  margin-bottom: 0.7rem; }

/* I need to find a workaround for using large font sizes with things to be based */
/* on 16 px font size */
.hero__title {
  font-size: 1.5em;
  font-weight: bold;
  color: #5066C2;
  max-width: 20em; }
  @media (min-width: 55em) {
    .hero__title {
      font-size: 2.5em; } }

.tags__item {
  display: inline-block;
  font-size: 0.875em; }
  .tags__item a {
    display: block;
    padding: 0.25em 0.75em;
    background: #d4d4d4;
    border-radius: 20px;
    min-width: 60px;
    text-align: center; }
    .tags__item a:hover {
      background: #5066C2;
      color: #fff; }

.bio {
  display: flex;
  font-size: 1em; }
  @media (min-width: 55em) {
    .bio {
      font-size: 1.125em; } }

.bio__avatar {
  width: 2.75em;
  height: 2.75em;
  border-radius: 50%;
  margin-right: 0.5em;
  object-fit: cover;
}

.bio__meta {
  color: #4a4a4a; }
  .bio__meta time,
  .bio__meta span {
    display: block;
    font-size: 85%;
    margin-top: 0.25em; }

.list {
  counter-reset: list; }

.list__item {
  font-size: 1em;
  margin-bottom: 0.8em; }
  .list__item:before {
    content: counter(list);
    counter-increment: list; }
  .list__item ul {
    counter-reset: sublist;
    font-size: 1em; }

.list__subitem {
  padding-left: 1.5em;
  font-size: 90%; }
  .list__subitem:not(:last-child) {
    margin-bottom: 0.7em; }
  .list__subitem:before {
    content: counter(list) "." counter(sublist);
    counter-increment: sublist; }
  .list__subitem span {
    font-size: 1em; }

.list__item,
.list__subitem {
  position: relative;
  min-height: 2.5em;
  padding-left: 2.75em;
  line-height: 2.5em; }
  .list__item:before,
  .list__subitem:before {
    position: absolute;
    left: 0;
    display: inline-block;
    width: 2.5em;
    height: 2.5em;
    background: lightgrey;
    border-radius: 50%;
    text-align: center;
    line-height: 2.5em;
    margin-right: 0.5rem; }

.button {
  background: #5066C2;
  border-radius: 0.25em;
  padding: 0.75em 1.25em;
  color: #fff;
  border: 0;
  font-size: 1em; }

.quote {
  position: relative;
  background: #ebebeb;
  padding: 1em;
  padding-left: 4.375em;
  border: 0.125em solid #bcbcbc;
  border-radius: 0.25em; }
  .quote:before {
    content: "";
    position: absolute;
    left: 1.375em;
    top: 1.5em;
    background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/quotes1.svg") no-repeat;
    background-size: 100%;
    width: 2.25em;
    height: 1.5625em; }
  .quote p {
    font-size: 1.5em; }

footer {
  padding: 1em;
  border-top: 1px solid grey;
  text-align: center;
}

footer a {
  color: #5066C2;
  text-decoration: underline;
}

footer a:hover {
  opacity: 0.8;
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console