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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!-- You only need the body content in codepen -->
<!-- <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Tuesday.com</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
    <link rel="stylesheet" type="text/css" href="style.css" />
  </head>
  <body> -->
    <div class="container">
      <header class="page-header">
        <!-- <div class="container"> -->
        <a href="/" class="logo">
          <img src="#" alt="Tuesday.com" />
        </a>
        <nav class="main-nav">
          <a href="/blog/">Blog</a>
          <a href="/product/">Product</a>
          <a href="/resources/">Resources</a>
          <a href="/customers/">Customers</a>
        </nav>
        <nav class="secondary-nav">
          <a href="/" class="login-buttton">
            <span class="top-btns">Login</span>
          </a>
          <a href="/" class="request-demo">
            <span class="top-btns">Request Demo</span>
          </a>
        </nav>
        <button class="nav-menu-toggle">&#x2630;<span class="sr-only">Open Nav Menu</span></button>
        <!-- </div> -->
      </header>
      <main>
          <section class="software-explanation">
            <!-- this is a grid item: row 1, col 1 and made to span to -1 in the CSS -->
            <hgroup class="title-block">
                <h1>OKR Software</h1>
                <h2>A new way to manage your work</h2>
            </hgroup>
            <!-- this is a grid item: row 2, col 1 and 100% width in the CSS -->
            <img src="https://via.placeholder.com/500" alt="">
            <!-- this is a grid item: row 3, col 1 and made to span to -1 in the CSS -->
            <ul class="logo-list">
                    <li><img src="https://via.placeholder.com/50?text=logo" alt=""></li>
                    <li><img src="https://via.placeholder.com/50?text=logo" alt=""></li>
                    <li><img src="https://via.placeholder.com/50?text=logo" alt=""></li>
                    <li><img src="https://via.placeholder.com/50?text=logo" alt=""></li>
                    <li><img src="https://via.placeholder.com/50?text=logo" alt=""></li>
                    <li><img src="https://via.placeholder.com/50?text=logo" alt=""></li>
                    <li><img src="https://via.placeholder.com/50?text=logo" alt=""></li>
                </ul>
            <!-- this is a grid item: row 4, col 1 -->
            <div>
                <h2>Build culture and motivate your team</h2>
                <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Ullam qui harum dolor soluta necessitatibus quae, reprehenderit porro eveniet tenetur omnis culpa sequi suscipit possimus consectetur cum voluptatum corrupti quos nobis?</p>
            </div>
            <!-- this is a grid item: row 4, col 2 -->
            <img src="https://via.placeholder.com/500" alt="">
          </section>
      </main>
      <footer class="page-footer">
          <p>footer</p>
      </footer>
    </div>
<!--   </body>
</html>


 -->
              
            
!

CSS

              
                html {
    box-sizing: border-box;
    font-size: 10px;
  }
  
  *,
  *::before,
  *::after {
    box-sizing: inherit;
  }
  
  body {
    font-size: 1.6rem;
    min-height: 100vh;
  }
  
  /* Generics */
  button,
  abbr,
  a {
    text-decoration: none;
    color: inherit;
  }
  
  a {
    text-decoration: none;
  }
  
  a:hover,
  a:focus {
    text-decoration: underline;
  }
  
  img {
    max-width: 100%;
    height: auto;
  }
  
  ul {
    padding: 0;
    list-style: none;
  }
  
  ul.typographic {
    list-style: initial;
    padding: initial;
  }
  
  a,
  abbr {
    text-decoration: none;
  }
  
  a:hover,
  a:focus {
    text-decoration: underline;
  }
  
  /* Typography */
  
  h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-family: Stratus, serif;
    /* outline: 1px solid; */
  }
  
  h1 {
    font-size: 3rem;
    margin-bottom: 1.5em;
  }
  
  h2 {
    font-size: 2.5rem;
    margin-bottom: 1.3em;
  }
  
  h3 {
    font-size: 2rem;
    margin-bottom: 1.2em;
  }
  
  h4 {
    font-size: 1.8rem;
    margin-bottom: 1.2em;
  }
  
  h5 {
    font-size: 1.9rem;
    margin-bottom: 1.2em;
  }
  
  h6 {
    font-size: 1.85rem;
    margin-bottom: 1.2em;
  }
  
  /* Accessibility Text */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .sr-only-focusable:active,
  .sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;

  }
  
.container {
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: 200px auto 50px;
    grid-template-areas: 
        'header'
        'content'
        'footer'
}

@media screen and (min-width: 601px) {
    .container {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 50px auto 50px;
        grid-template-areas: 
            'header header'
            'content content'
            'footer footer';
    }
}

.page-header {
    grid-area: header;
    background-color: orange;
    display: flex;
    align-items: flex-start; /* or menu button will stretch*/
}
main {
    grid-area: content;
    background-color: green;
}
.page-footer {
    grid-area: footer;
    background-color: black;
}

.page-header nav {
    display: none;
}

.nav-menu-toggle {
    color: red;
    margin-left: auto;
}

.main-nav {
    margin-left: auto;
}

.secondary-nav {
    background-color: red;
    color: white;   
}

.main-nav a,
.secondary-nav a {
    padding: 15px;
}

@media screen and (min-width: 601px) {
    .page-header nav {
        display: flex;
    }
    .nav-menu-toggle {
        display: none;
    }
}

.software-explanation {
  outline: 5px solid blue;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: repeat(7, auto);
}

@media screen and (min-width: 601px) {
    .software-explanation {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(7, auto);
    }
}

/* changing where these are placed because the auto-placement of 1 child item per grid cell has put them in the wrong place */

/* From row start to row end */
.title-block {
  grid-column-start: 1;
  grid-column-end: -1;
}

/* ...same, but displayed flex */
.logo-list {
    grid-column-start: 1;
    grid-column-end: -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* .logo-list li {
    display: flex;
} */


.page-footer {
    color: #fff;
}




              
            
!

JS

              
                
              
            
!
999px

Console