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 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.

Quick-add: + add another resource

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.

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
Loading ..................

Console