Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <main class="container">
  <div class="left-page">
    <div class="title">
      <div class="logo">
        <div class="logo-image">
          <div class="box"></div>
          <div class="box"></div>
          <div class="box"></div>
          <div class="box"></div>
        </div>
        <div class="logo-text">Flexbox</div>
      </div>
      <nav class="nav">
        <ul>
          <li><a href="#">Contact</a>
          <li><a href="#">Team</a>
          <li><a href="#">Portfolio</a></li>
        </ul>
      </nav>
    </div>
    <div class="content">
      <div class="heading">
        <h1>Studio Flexbox</h1>
      </div>
      <div class="description"><p>Recently, the US Federal government banned online casinos from operating in America by making it illegal to transfer money to them through any US bank or payment.</p></div>
      <div class="cta">
        <button>Say Hello</button>
      </div>
    </div>
    <div class="social">
      <div class="info">
        <p>Get in touch</p>
      </div>
      <div class="icons">
        <div class="links">
          <span>
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 56" version="1.1" width="2rem" height="2rem">
              <path d="M40.43,21.739h-7.645v-5.014c0-1.883,1.248-2.322,2.127-2.322c0.877,0,5.395,0,5.395,0V6.125l-7.43-0.029  c-8.248,0-10.125,6.174-10.125,10.125v5.518h-4.77v8.53h4.77c0,10.947,0,24.137,0,24.137h10.033c0,0,0-13.32,0-24.137h6.77  L40.43,21.739z" fill="#00bfa5"/>
            </svg>
          </span>
          <span>
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" version="1.1" width="2rem" height="2rem">
  <path style=" " d="M 25.855469 5.574219 C 24.914063 5.992188 23.902344 6.273438 22.839844 6.402344 C 23.921875 5.75 24.757813 4.722656 25.148438 3.496094 C 24.132813 4.097656 23.007813 4.535156 21.8125 4.769531 C 20.855469 3.75 19.492188 3.113281 17.980469 3.113281 C 15.082031 3.113281 12.730469 5.464844 12.730469 8.363281 C 12.730469 8.773438 12.777344 9.175781 12.867188 9.558594 C 8.503906 9.339844 4.636719 7.246094 2.046875 4.070313 C 1.59375 4.847656 1.335938 5.75 1.335938 6.714844 C 1.335938 8.535156 2.261719 10.140625 3.671875 11.082031 C 2.808594 11.054688 2 10.820313 1.292969 10.425781 C 1.292969 10.449219 1.292969 10.46875 1.292969 10.492188 C 1.292969 13.035156 3.101563 15.15625 5.503906 15.640625 C 5.0625 15.761719 4.601563 15.824219 4.121094 15.824219 C 3.78125 15.824219 3.453125 15.792969 3.132813 15.730469 C 3.800781 17.8125 5.738281 19.335938 8.035156 19.375 C 6.242188 20.785156 3.976563 21.621094 1.515625 21.621094 C 1.089844 21.621094 0.675781 21.597656 0.265625 21.550781 C 2.585938 23.039063 5.347656 23.90625 8.3125 23.90625 C 17.96875 23.90625 23.25 15.90625 23.25 8.972656 C 23.25 8.742188 23.246094 8.515625 23.234375 8.289063 C 24.261719 7.554688 25.152344 6.628906 25.855469 5.574219 " fill="#fff"/>

            </svg>
          </span>
          <span>
            <svg xmlns="http://www.w3.org/2000/svg"  version="1.1" width="2rem" height="2rem">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 0C7.16703 0 0 7.16703 0 16C0 24.833 7.16703 32 16 32C24.8156 32 32 24.833 32 16C32 7.16703 24.8156 0 16 0ZM26.5683 7.37527C28.4772 9.70065 29.6226 12.6681 29.6573 15.8785C29.2061 15.7918 24.6941 14.872 20.1475 15.4447C20.0434 15.2191 19.9566 14.9761 19.8525 14.7332C19.5748 14.0738 19.2625 13.397 18.9501 12.7549C23.9826 10.7072 26.2733 7.75705 26.5683 7.37527ZM16 2.36009C19.4707 2.36009 22.6464 3.66161 25.0586 5.7961C24.8156 6.14317 22.7505 8.90239 17.8915 10.7245C15.6529 6.61171 13.1714 3.24512 12.7896 2.72451C13.8134 2.48156 14.8894 2.36009 16 2.36009ZM10.1866 3.64425C10.551 4.13015 12.9805 7.5141 15.2538 11.5401C8.86768 13.2408 3.22777 13.2061 2.62039 13.2061C3.50542 8.9718 6.36876 5.44902 10.1866 3.64425ZM2.32538 16.0174C2.32538 15.8785 2.32538 15.7397 2.32538 15.6009C2.9154 15.6182 9.54447 15.705 16.3644 13.6573C16.7636 14.4208 17.128 15.2017 17.4751 15.9826C17.3015 16.0347 17.1106 16.0868 16.9371 16.1388C9.89154 18.4121 6.14317 24.6247 5.8308 25.1453C3.6616 22.7332 2.32538 19.5228 2.32538 16.0174ZM16 29.6746C12.8416 29.6746 9.92625 28.5987 7.61822 26.7939C7.86117 26.2907 10.6377 20.9458 18.3427 18.256C18.3774 18.2386 18.3948 18.2386 18.4295 18.2213C20.3557 23.2017 21.1367 27.3839 21.3449 28.5813C19.6963 29.2928 17.8915 29.6746 16 29.6746ZM23.6182 27.3319C23.4794 26.4989 22.7505 22.5076 20.9631 17.5965C25.2495 16.9197 28.9978 18.0304 29.4664 18.1866C28.8764 21.987 26.6898 25.2668 23.6182 27.3319Z" fill="#fff"/>
</svg>
          </span>
          <span>
            <svg viewBox="0 0 56 56" width="2rem" xmlns="http://www.w3.org/2000/svg"><path d="M23.556,29.975c0,0,4.701-0.35,4.701-5.863c0-5.514-3.846-8.206-8.719-8.206h-8.97h-0.263H3.503v30.815h6.802h0.263h8.97   c0,0,9.788,0.309,9.788-9.096C29.325,37.625,29.753,29.975,23.556,29.975z M10.568,21.383h7.815h1.154c0,0,2.18,0,2.18,3.205   c0,3.207-1.283,3.672-2.736,3.672h-8.414V21.383z M19.084,41.244c-0.237,0.006-0.438,0-0.573,0h-7.943V33.01h8.97   c0,0,3.249-0.043,3.249,4.23C22.786,40.846,20.36,41.217,19.084,41.244z" fill="#fff"/><path d="M42.382,23.746c-11.85,0-11.84,11.84-11.84,11.84s-0.812,11.779,11.84,11.779c0,0,10.545,0.602,10.545-8.195h-5.424   c0,0,0.18,3.314-4.941,3.314c0,0-5.422,0.361-5.422-5.363h15.967C53.106,37.121,54.854,23.746,42.382,23.746z M37.079,33.01   c0,0,0.662-4.75,5.422-4.75c4.762,0,4.699,4.75,4.699,4.75H37.079z" fill="#fff"/></svg>
          </span>
        </div>
      </div>
    </div>
  </div>
  <div class="right-page">
    <div class="previews">
      <div class="project"></div>
      <div class="project"></div>
    </div>
    <div class="major">
      <div class="project">
        <div class="banner">
          <div class="left">
            <div class="title">Project Title</div>
            <div class="summary">Recently, the US Federal government banned online casions from operating in America</div>
            <div class="controls">
              <div class="switch">
               <a href='#' class="left-icon"><img src="https://flaticons.net/gd/makefg.php?i=icons/Mobile%20Application/Left-Arrow.png&r=255&g=255&b=255" alt="l"></a>
               <a href='#' class="right-icon"><img src="https://flaticons.net/gd/makefg.php?i=icons/Mobile%20Application/Next.png&r=255&g=255&b=255" alt="r"></a>
              </div>
            </div>
          </div>
          <div class="right">
            <button class="outline">Read more</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</main>
              
            
!

CSS

              
                $logo_size: 2rem;
body {
  margin: 0;
  height: 100vh;
  max-height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  font-family: 'Lato', sans-serif;
  font-size: 20px;
  font-weight: 200;
}

button {
  font-size: 1rem;
  padding: 1rem 3rem;
  border-radius: .3rem;
  cursor: pointer;
}
a {
  color: #fff;
  text-decoration: none;
}
.container {
  display: flex;
  justify-content: center;
  color: #fff;
  height: 100%;
  box-sizing: border-box;
  
  .left-page {
    width: 50%;
    display: flex;
    flex-direction: column;
    background: #424242;
    background-image: linear-gradient(to right, rgba(33, 33, 33, 0.8), rgba(40,40,40, 1) 70%), url('https://images.unsplash.com/photo-1473777785975-efb668f9ea99?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=b517cd35d79c6c47ffcd8f9b95e36941&auto=format&fit=crop&w=1950&q=80');
    background-position: 120% 50%;
    background-repeat: repeat-y;
    justify-content: center;
    flex-grow: 1;
    padding: 3% 5% 4% 8%;
    box-sizing: inherit;
    
    .title {
      display: flex;
      justify-content: space-between;
      
      .logo {
        flex-grow: 0;
        align-self: center;
        display: flex;
        justify-content: space-between;
        flex: none;
        max-width: 150px;
        
        .logo-image {
          display: flex;
          flex-flow: row wrap;
          width: $logo_size;
          align-items: center;
          justify-content: center;
          margin-right: .8rem;
          
          .box {
            flex-basis: 50%;
            height: $logo_size/2;
          }
          .box:nth-of-type(1){
background: linear-gradient(to right, rgba(255,0,132,1) 0%, rgba(148,6,82,1) 100%);}
          .box:nth-of-type(2){background: linear-gradient(to right, rgba(7,230,167,1) 0%, rgba(48,184,118,1) 100%);}
          .box:nth-of-type(3){background: linear-gradient(to left, rgba(169,94,255,1) 0%, rgba(98,18,163,1) 100%);}
          .box:nth-of-type(4){background: linear-gradient(to right, rgba(126,62,199,1) 0%, rgba(20,60,161,1) 100%);}
        }
        
        .logo-text {
          align-self: center;
        }
      }
      
      .nav {
        display: flex;
        flex-grow: 1;
        justify-content: flex-end;
        
        ul {
          display: flex;
          flex-flow: row-reverse nowrap;
          overflow-x: scroll;
          flex-basis: 100%;
          
          li {
            list-style: none;
            margin: 0 2%;
          }
        }
      }
    }
    
    .content {
      flex-grow: 1;
      display: flex;
      flex-flow: column nowrap;
      padding: 20% 0;
      
      .heading {
        margin: 0 0 1% 0;
        flex: 0 1 auto;
      }
      
      .description {
        margin: 1% 0 5% 0;
        line-height: 1.8rem;
        overflow-y: scroll;
      }
      
      .cta {
        display: flex;
        flex-flow: column nowrap;
        justify-content: center;
        flex: none;
        align-items: flex-start;
        
        button {
          color: #fff;
          background: #00bfa5;
          background-image: linear-gradient(45deg, rgba(10,191,161,1) 0%, #92fcbb 100%);
          border: 0;
          box-shadow: 0 0 10rem -2rem rgba(200,0,0,.8);
          
          &:hover {
            background: #fff;
            color: #00bfa5;
          }
        }
      }
    }
    
    .social {
      flex-shrink: 1;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      
      .info {
        font-size: 1.4rem;
        font-weight: lighter;
      }
      
      .icons {
        width: 30%;
        
        .links {
          cursor: pointer;
          display: flex;
          justify-content: space-between;
          flex: auto;
          
          span {
            width: 2rem;
            height: 2rem;
          }
        }
      }
    }
  }
  
  .right-page {
    max-width: 50%;
    flex-basis: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-grow: 1;
    
    .project {
      flex-grow: 1;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .previews {
      background: cyan;
      flex-basis: 40%;
      display: flex;
      align-items: stretch;
      
      .project:nth-of-type(1) {
        background: #7b1fa2;
        background-image: linear-gradient(to right bottom, rgba(124, 79, 178, 0.8), rgba(123, 31, 162, 0.614)), url("https://images.unsplash.com/photo-1524293191286-59ec719556d4?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=1072927ece6d8f615a2c26a88991296b&auto=format&fit=crop&w=654&q=80");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
      }
      .project:nth-of-type(2) {
        background: #3949ab;
        background-image: linear-gradient(to right bottom, rgba(57, 72, 171, 0.8), rgba(57, 120, 203, 0.6)), url("https://images.unsplash.com/photo-1518304256228-bb65fd3df672?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=67f3dae2c86fb8fc1009e5cc823cec19&auto=format&fit=crop&w=834&q=80");
        background-size: cover;
        background-position: center;
      }
    }
    .major {
      flex-basis: 60%;
      
      .project {
        height: 100%;
        flex-grow: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        background: #c51162;
        background-image: linear-gradient(to right bottom, rgba(209, 25, 127, 0.8), rgba(145, 1, 30, 0.8)), url("https://images.unsplash.com/photo-1509624841974-19055d96ffcc?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=d8af9fa5260e5b17094ceceef4c69627&auto=format&fit=crop&w=1050&q=80");
        background-size: cover;
        background-position: center;
        
        .banner {
          background: #00000044;
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 5%;
          box-sizing: border-box;
          flex-shrink: 0;
          padding: 5%;
          max-height: 60%;
          min-height: 40%;
          width: 100%;
          
          .left {
            width: 60%;
            padding: 1%;
            display: flex;
            flex-direction: column;
            flex: none;
            
            .title {
              font-size: 1.3rem;
              line-height: 1.8;
              flex-basis: 20%;
            }
            
            .summary {
              margin: 1% auto 3% auto;
              flex-basis: 60%;
              overflow-y: scroll;
            }
            
            .controls {
              display: flex;
              flex-direction: column;
              justify-content: flex-start;
              
              .switch {
                display: flex;
                width: 20%;
                justify-content: space-between;
                
                a {
                  text-decoration: none;
                  color: #fff;
                  
                  img {
                    max-height: 30px;
                  }
                }
              }
            }
          }
          .right {
            flex-basis: 20%;
            display: flex;
            flex-grow: 1;
            
            .outline {
              margin: 0 auto;
              color: #fff;
              background: transparent;
              border: .1rem #fff Solid;
              &:hover {
                background: #fff;
                color: #000;
              }
            }
          }
        }
      }
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console