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

              
                <div class="container">
  <header class="header">
    <nav class="nav">
    <ul class="nav-list">
      <li class="nav-item logo"><a href="#" class="nav-link"><svg viewBox="0 0 512 512" width="100" title="cat">
  <path d="M290.59 192c-20.18 0-106.82 1.98-162.59 85.95V192c0-52.94-43.06-96-96-96-17.67 0-32 14.33-32 32s14.33 32 32 32c17.64 0 32 14.36 32 32v256c0 35.3 28.7 64 64 64h176c8.84 0 16-7.16 16-16v-16c0-17.67-14.33-32-32-32h-32l128-96v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V289.86c-10.29 2.67-20.89 4.54-32 4.54-61.81 0-113.52-44.05-125.41-102.4zM448 96h-64l-64-64v134.4c0 53.02 42.98 96 96 96s96-42.98 96-96V32l-64 64zm-72 80c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16zm80 0c-8.84 0-16-7.16-16-16s7.16-16 16-16 16 7.16 16 16-7.16 16-16 16z" />
</svg></a></li>
      <li class="nav-item"><a href="#" class="nav-link">Magazine</a></li>
      <li class="nav-item"><a href="#" class="nav-link">Merchandise</a></li>
      <li class="nav-item"><a href="#" class="nav-link">The Team</a></li>
      <li class="nav-item"><a href="#" class="nav-link">Contact Us</a></li>
    </ul>  
  </nav>
  </header>
  <div class="big-kittie">
  </div>
  <main class="main">
    <h1 class="main-title">The Cats <br> <span class="space-1">Will </span> <br> <span class="space-2">Know</span></h1>
    <p class="main-paragraph">Rain will fall again on your smooth pavement, a light rain like a breath or a step. The breeze and the dawn will flourish again
when you return, as if beneath your step.  Between flowers and sills the cats will know.(https://www.poetryfoundation.org/poems/51514/the-cats-will-know)
    </p>
  </main>
  <section class="kittie">  
  </section>
  <section class="verse">
    <p class="verse-para">Winter. Time to eat fat and watch hockey. In the pewter mornings, the cat,
a black fur sausage with yellow Houdini eyes, jumps up on the bed and tries to get onto my head. (https://www.poetryfoundation.org/poems/47787/february-56d2288025b1e)</p>
  </section>
  <footer class="footer">
    <p class="footer-para">Made with ❤️❤️❤️ by Maria Antonietta</p>
  </footer>
</div>
              
            
!

CSS

              
                /* general styles */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background: linear-gradient(90deg, rgba(153,98,189,1) 50%, rgba(251,203,71,1) 50%);
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
a {
  text-decoration: none;
}
p {
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
}
svg {
  fill: white;
}

/* components */
.container {
  /*height: 100vh;*/
  max-width: 1200px;
  margin: 1rem auto;
}
/* header part */
.header {
  text-align: center;
}
.nav {
  max-width: 100%;
  /*padding: 1rem;*/
}
.nav-list {
  width: 100%;
  padding-bottom: 1rem;
  padding-top: 1rem;
  background-color: #222;
  opacity: 0.8;
}
.nav-item {
  margin-bottom: 1rem;
}
.logo a svg {
  transform: rotate(-10deg);
  transition: all 0.2s; 
}
.logo a:hover svg,
.logo a:focus svg {
  transform: rotate(0deg);  
}
.nav-link {
  color: white;
  text-transform: uppercase;
  font-weight: bold;
}
.nav-link:hover,
.nav-link:focus {
  text-decoration: underline;
}
.big-kittie {
  background-image: url("https://images.unsplash.com/photo-1500603720222-eb7a1f997356?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYyNzI0MTk3OQ&ixlib=rb-1.2.1&q=85");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  min-height: 300px;
}
.main {
  padding: 2rem;
  background-color: #222;
  color: white;
  opacity: 0.8;
}
.main-title {
  margin-top: 0;
  line-height: 0.8;
}
.main-paragraph {
  max-width: 80ch;   
}
.space-1 {
  margin-left: 2rem;
}
.space-2 {
  margin-left: 4rem;
}
.verse {
  padding: 1rem;
  background-color: white;
}
.verse-para {
  max-width: 80ch;
}
.kittie {
  background-image: url("https://images.unsplash.com/photo-1592194996308-7b43878e84a6?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYyNzI1MzM5MA&ixlib=rb-1.2.1&q=85");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  min-height: 500px;
}
.footer {
  padding: 2rem;
  text-align: center;
  background-color: #000;
  color: white;
}

/* media queries */

@media (min-width: 767px) {
  .container {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.5fr;
    grid-template-rows: 1fr 4fr 3fr 2fr;
  }
  .header {
    grid-area: 1 / 2 / 2 / 3;
    z-index: 1;
    background-color: #000;
    padding-bottom: 100%;
  }
  .nav {
    background-color: #000;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }
  .nav-list {
    background-color: #000;
    opacity: 1;
  }
  .big-kittie {
    grid-area: 1 / 3 / 5 / 5;
  }
  .main {
    /* row start, row end, col start col end */
    grid-area: 1 / 1 / 3 / 2;
  }
  .kittie {
    grid-area: 3 / 1 / 4 / 2;
  }
  .verse {
    grid-area: 3 / 2 / 4 / 3;
    font-size: 0.8rem;
  }
  .footer {
    grid-area: 4 / 1 / 5 / 3;
    display: grid;
    align-items: center;
  }
}



@media (min-width: 960px) {
  .header {
    grid-area: 1 / 4 / 4 / -1;
    background-color: transparent;
    padding-bottom: 0;
  }
  .nav {
    background-color: #222;
    opacity: 0.8;
  }
  .nav-list {
    background-color: #222;
    opacity: 0.8;
  }
  .main {
    /* row start, row end, col start col end */
    grid-area: 1 / 1 / 3 / 3;
  }
  .main-paragraph {
    line-height: 1.6;
    letter-spacing: 1px;
  }
  .kittie {
    min-height: 200px;
  }
}

@media (min-width: 1200px) {
  .header {
    grid-area: 1 / 3 / 2 / -1;
    text-align: left;
  }
  .nav {
    opacity: 1;
  }
  .nav-list {
    display: grid;
    grid-auto-flow: column;
    opacity: 1;
  }
  .nav-item {
    font-size: 0.8rem;
    align-self: center;
    text-align: right;
    margin-bottom: 0;
  }
  .logo {
    text-align: left;
  }
  .header svg {
    width: 50px;
    height: 50px;
  }
  .big-kittie {
    grid-area: 2 / 3 / 5 / -1;
  }
  .main-paragraph {
    font-size: 1.2rem;
    max-width: 60ch;
    line-height: 1.6;
    letter-spacing: 1px;  
  }
  .verse-para {
    font-size: 1.1rem;
    line-height: 1.6;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console