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="app" ng-app>
  <div ng-controller="ctrlSizing">
    <label>Width: <input ng-model="width" type="number" placeholder="How about 300?"></label>
    <label>Height: <input ng-model="height" type="number" placeholder="For example: 200"></label>
    <div class="box" style="width: {{width}}px; height: {{height}}px; line-height: {{height}}px;">{{width}} x {{height}}</div>

/* Need to write the JS here because otherwise it wouldn't work in the CodePen Embed or Full Page View. */
function ctrlSizing($scope) {
  $scope.width = 200;
  $scope.height = 200;
              @import "compass/css3";

.app {
  margin: 0 auto;
  max-width: 200px;

input {
  margin: 5px 0 15px 0;
  padding: 3px 6px;
  display: block;
  width: 100%;

.box {
  margin: 20px 0 0 0;
  text-align: center;
  background: #7edc6c;

/* Martin Wolf CodePen Standard */

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

* {
  margin: 0;
  padding: 0;
  @include box-sizing(border-box);

body {
  padding: 3em 2em;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1em;
  line-height: 1;
Loading ..................