Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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.

+ add another resource

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <fieldset class="options">
  <legend>Checkbox</legend>
  <div class="checkbox">
    <input id="checkbox1" name="checkbox" type="checkbox" checked="checked">
    <label for="checkbox1">Choice A</label>
  </div>
  <div class="checkbox">
    <input id="checkbox2" name="checkbox" type="checkbox">
    <label for="checkbox2">Choice B</label>
  </div>
  <div class="checkbox">
    <input id="checkbox3" name="checkbox" type="checkbox">
    <label for="checkbox3">Choice C</label>
  </div>
</fieldset>



  <fieldset class="options">
    <legend>Radio</legend>
    <div class="radio">
      <input id="radio1" name="radio" type="radio">
      <label for="radio1">Choice A</label>
    </div>
    <div class="radio">
      <input id="radio2" name="radio" type="radio">
      <label for="radio2">Choice B</label>
    </div>
    <div class="radio">
      <input id="radio3" name="radio" type="radio">
      <label for="radio3">Choice C</label>
    </div>
  </fieldset>
              
            
!

CSS

              
                body {
  font-size: 24px;
  margin: 100px 0;
}

.radio,
.checkbox {
  margin: 0 0 20px;
  padding: 0;

  /* Hide default checkbox and radio button */
  input[type='checkbox'],
  input[type='radio'] {
    opacity: 0;
    width: 1px;
    height: 1px;
  }

  label {
    position: relative;
    padding-left: 35px;
  }
}


/* Draw a box and add borders to it */
.checkbox label::before {
  border: 2px solid #e15b00;
  content: '';
  display: inline-block;
  height: 24px;
  left: 0;
  position: absolute;
  top: -2px;
  width: 24px;
}

/* Draw checkmark */
.checkbox label::after {
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  content: '';
  display: inline-block;
  height: 10px;
  left: 4px;
  position: absolute;
  top: 2px;
  transform: rotate(-45deg);
  width: 18px;
}

/* Draw a circle and add borders to it */
.radio label::before {
  border-radius: 50%;
  border: 2px solid #e15b00;
  content: '';
  display: inline-block;
  height: 24px;
  left: 2px;
  position: absolute;
  top: -4px;
  width: 24px;
}

/* Draw an inner circle */
.radio label::after {
  background-color: #e15b00;
  border-radius: 50%;
  content: '';
  display: inline-block;
  height: 20px;
  left: 6px;
  position: absolute;
  top: 0;
  width: 20px;
}

/* Hide checkmark and inner circle by default */
.radio input[type='radio'] + label::after,
.checkbox input[type='checkbox'] + label::after {
  content: none;
}

/* Show checkmark and inner circle when input is checked */
.radio input[type='radio']:checked + label::after,
.checkbox input[type='checkbox']:checked + label::after {
  content: '';
}

/* When box is checked, add background color. */
.checkbox input[type='checkbox']:checked + label::before {
  content: '';
  background-color: #e15b00;
}

/* Add focus styles */
.radio input[type='radio']:focus + label::before,
.checkbox input[type='checkbox']:focus + label::before {
  outline: rgb(59, 153, 252) auto 5px;
}

// Fieldset
fieldset {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 20px;
  margin-bottom: 40px;
}

              
            
!

JS

              
                
              
            
!
999px

Console