octocatstartv

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="promos">  
    <div class="promo first">
        <h4>Basic</h4>
        <ul class="features">
            <li class="brief">Basic membership</li>
            <li class="price">$69</span></li>
            <li>Some great feature</li>
            <li>Another super feature</li>
            <li>And more...</li>
            <li class="buy"><button>Sign up</button></li>   
        </ul>
    </div>
    <div class="promo second">
        <h4>Plus</h4>
        <ul class="features">
            <li class="brief">Plus membership</li>
            <li class="price">$79</li>
            <li>Some great feature</li>
            <li>Another super feature</li>
            <li>And more...</li> 
            <li class="buy"><button>Sign up</button></li>  
        </ul>
    </div>
    <div class="promo third scale">
        <h4>Premium</h4>
        <ul class="features">
            <li class="brief">This is really a good deal!</li>
            <li class="price">$89</li>
            <li>Some great feature</li>
            <li>Another super feature</li>
            <li>And more...</li>  
            <li class="buy"><button>Sign up</button></li> 
        </ul>
    </div>  
</div>
            
          
!

CSS

            
              @import "compass/css3";

@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,600);
@import "compass";

// mixins
// scottnix.com/placement-of-media-queries/
@mixin breakpoint($point) {
    @if $point == medium {
        @media (min-width: 30em)  { @content; }
    }
    @else if $point == large {
        @media (min-width: 50em) { @content; }
    }
    @else if $point { // allows custom breakpoints
        @media (min-width: $point) { @content; }
    }
}

// variables
$background: #0F1012;
$header-color: #f9f9f9;
$body-color: #999999;
$body-color-secondary: #292b2e;
$accent-color: #64AAA4;

*,
*:before,
*:after {
    @include box-sizing(border-box);
    @include transition(color .3s ease-in-out, background .3s ease-in-out);
}
body {
    background: rgb(246, 248, 248);
    font-size: 100%;
    padding: 3em 0;
}
.promos {
    max-width: 1140px;
    margin: 0 auto;
}
.promo {
    margin: 1em .5em 1.625em;
    padding: .25em 0 2em;
    background: $background;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400; 
    line-height: 1.625;
    color: $header-color;
    text-align: center;

    @include breakpoint(40em) {
        display: inline;
        float: left;
        width: 33.333%;
        margin: 1em 0 0;
        &.first {
            border-right: none;
        }
        &.second {
            float: right;
            border-left: none;
        }
    }
    h4 {
        margin: .25em 0 0;
        font-size: 170%;
        font-weight: normal;
    }
    .features {
        margin: 0;
        padding: 0;
        list-style-type: none;
        color: $body-color;
    }
    li {
        padding: .25em 0;
    }
    .brief { 
        color: $header-color;
    }
    .price {
        margin: .5em 0;
        padding: .25em 0;
        background: $body-color-secondary;
        font-size: 250%;
        color: $header-color;
    }
    .buy {
        margin: 1em 0 0;
    }
    button {
        padding: 1em 3.25em;
        border: none;
        border-radius: 40px;
        background: $body-color-secondary;
        color: $header-color;
        cursor: pointer;
        &:hover {
            background: darken($body-color-secondary, 1%);
        }    
    }
}
.scale {
    button {
        background: $accent-color;
        &:hover {
            background: darken($accent-color, 10%);
        }
    }

    @include breakpoint(40em) {
        transform: scale(1.2);
        box-shadow: 0 0 4px 1px rgba(20, 20, 20, 0.8);
        .price {
            color: $accent-color;
        }
    }
}

            
          
!

JS

            
              // Responsive SCSS Price Table
// Forked from http://codepen.io/bronsrobin/pen/BLgHb

// Modified it to be responsive, also increased a few sizing elements to fill the 1140px min width better. I mashed some of my previous Responsive Pricing Tier - http://codepen.io/scottnix/pen/mjDbe structure also.

// SCSS, Compass, Responsive, FTW.
// scottnix.com
            
          
!
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