octocatstartv

hGtFE

A Pen By waylaid

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <div class="navigation">
  Navigation
</div>

<div class="blue-box">
 Blue box
</div>

<div class="left-column">
  <div class="dark-grey-text">
  Dark grey text: Fusce tincidunt, libero at luctus malesuada, lorem odio pellentesque justo, quis vulputate sem arcu sit amet orci. Nulla mollis mattis urna, ut molestie tellus viverra eu. Vivamus sed ullamcorper justo. Vivamus bibendum sapien in leo malesuada pulvinar. Quisque iaculis aliquam ornare. In ante erat, elementum sed est sed, sollicitudin tincidunt mauris. Nulla at porttitor lorem. Quisque magna tortor, sollicitudin ut convallis quis, faucibus vitae diam. In vitae leo risus. Nulla nec eros id quam malesuada pharetra.
  </div>
  <div class="grey-text">
  Grey text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sed nulla ultricies, cursus est ut, facilisis felis. Maecenas sit amet porttitor ipsum, vitae viverra augue. Nunc condimentum lobortis purus, non facilisis magna facilisis sit amet. Mauris gravida ultrices arcu, non vestibulum nisi eleifend eu. Donec eleifend risus turpis, eu vehicula velit iaculis nec. Proin mollis, erat ac pellentesque viverra, lacus lectus faucibus sem, vitae vestibulum turpis nunc et metus. Sed consectetur tellus viverra, feugiat magna nec, commodo metus.
  </div>
</div>

<div class="pink-green-wrapper">
<div class="green-box">
  Green box
</div>

<div class="pink-box">
  Pink box
</div>
</div>

<div class="footer">
  Footer
</div>
            
          
!

CSS

            
              .navigation {
  clear: both;
  height: 50px;
  margin-bottom: 20px;
  background-color: black;
  color: white;
}

.blue-box {
  float: right;
  width: 20%;
  height: 150px;
  margin-bottom: 20px;
  background-color: blue;
}

.left-column {
  float: left;
  width: 75%;
}
.dark-grey-text {
  
}

.grey-text {
  margin-top: 20px;
  margin-bottom: 20px;
  color: grey;
}

.pink-green-wrapper {
  width: 20%;
  float:right;
  clear: right;
  margin-bottom: 20px;
}

.pink-box {
  float: left;
  width: 50%;
  height: 150px;
  background-color: pink;
}

.green-box {
  float: left;
  width: 50%;
  height: 150px;
  background-color: green;
}



.footer {
  clear: both;
  height: 50px;
  background-color: black;
  color: white;
}

@media all and (max-width: 480px)  {
		.blue-box {
		  float: none;
			width: 100%;
		}
    .left-column {
      width: 100%;
      float: none;
    }
          .pink-green-wrapper {
            float: none;
            width: 100%;
          }
    .pink-box, .green-box {
      float: left;
      width: 50%;
      margin-bottom: 20px;
    }
}
            
          
!

JS

            
              
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console