cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

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

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.

            
              <div class="wa full"></div>

<div class="wa third"></div>
<div class="wa third"></div>
<div class="wa third"></div>

<div class="wa full"></div>

<div class="wa quarter"></div>
<div class="wa quarter"></div>
<div class="wa quarter"></div>
<div class="wa quarter"></div>

<div class="wa full"></div>

            
          
!
            
              .boxSizing(@sizing:border-box){
    -webkit-box-sizing: @sizing;
    -moz-box-sizing: @sizing;
    box-sizing: @sizing;
}

body {
    .boxSizing();
    /* 
        1em is equal to the current font size. 
        The default text size in browsers is 16px. 
        So, the default size of 1em is 16px. 
        https://www.w3schools.com/css/css_font.asp
    */
    
    /* 
        Sticking to a psudo golden ratio / Fibonacci using em using 16px as base font size
        1em, 1em, 2em, 3em, 5em, 8em, 13em, 21em ...
        16px 16px 32px 48px 80px 128px... 
        Φ(1em) ≈ 16px... 
    */    
    
    font-size:16px;
    line-height: 1.5em;
    h4: 1em;      //~16px
    h3: 1.5em;    //~24px
    h2: 2em;      //~32px
    h1: 3em;      // 48px > 9mm on mosts screens:
    
    /*
        48px > 9mm on mosts screens: 
        Optimal touch targets should be minimum of 9mm 
        (some go as high as 9.4mm as optimal ≈ 44 pixels)
        Denser screens complicate absolute pixel measurements somewhat...
    */
    
    button {
        height: 3em;    
    }
    
    font-family: Arial, Helvetica, sans-serif;
    
    padding:0.25em;
    margin: 0 auto;
}

.wa {
    display:inline-block;
    margin:0 0.05em 0 0;
    height:48px;
    background-color:#FFCC00;
}

.full {
    width:99.8%;
}

.third {
    width:32.3333%;
    /* IE 8 & Opera Mini have trouble with Calc(), IE 9 Partially supports */
    /*   SUPER HACKY   */
    width:~"calc(100% / 3 - 0.235em)";
        .boxSizing();
}

.quarter {
    width:24%;
    /* IE 8 & Opera Mini have trouble with Calc(), IE 9 Partially supports */
    /*   SUPER HACKY   */
    width:~"calc(100% / 4 - 0.258em)";
        .boxSizing();
}
            
          
!
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