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

              
                <h1>The Box Model, Box-sizing & Box-shadow</h1>

<div class="box-model-wrap">
  <hr>
  <p>le box model</p>
  <div class="box-model"></div>
  <p>
    <span class="content">Content</span>
    <span class="padding">Padding</span>
    <span class="border">Border</span>
    <span class="margin">Margin</span>
  </p>
</div>

<div class="no-border">
  <hr>
  <p>no border on these boxes</p>
  <div class="container">
      <div class="box"></div>
      <div class="box"></div>
      <div class="box"></div>
  </div>
</div>




<div class="one-border">
  <hr>
  <p>1px border on these boxes</p>
  <div class="container">
      <div class="box"></div>
      <div class="box"></div>
      <div class="box"></div>
  </div>
</div>




<div class="lesson-border">
  <hr>
  <p>f the police</p>
  <div class="container">
      <div class="box"></div>
      <div class="box"></div>
      <div class="box"></div>
  </div>
</div>
              
            
!

CSS

              
                @import bourbon

@import url(https://fonts.googleapis.com/css?family=Amatic+SC)

body
  padding: 50px
  font-family: monospace

h1
  font-size: 60px
  text-align: center
  margin-bottom: 50px
  font-family: 'Amatic SC', monospace

hr
  border: 0
  border-top: 1px dashed #ccc
  width: 40%
  padding-bottom: 50px
p
  text-align: center
  margin-top: 50px
  
.box-model
  +size(200px)
  margin: 60px auto
  background: rgba(0, 255, 0, 0.19)
  border: 4px black solid
  box-shadow: 0px 0px 0px 20px lightblue inset, 0px 0px 0px 20px lightcoral

.box-model-wrap
  margin-bottom: 50px
  
  span
    margin-right: 15px

    &:before
      content: ''
      display: inline-block
      +size(13px)
      border-radius: 50%
      background: #ccc
      margin-right: 3px
      vertical-align: bottom

    &.content:before
      background: rgba(0, 255, 0, 0.19)
    &.padding:before
      background: lightblue
    &.border:before
      background: black
    &.margin:before
      background: lightcoral

.container
  border: 2px solid #999
  width: 600px
  margin: 50px auto
  +clearfix
  
.box
  +size(180px 100px)
  background: #cccccc
  margin: 10px
  float: left

    
    
    
    
// - - - - - - - - - - - - - - - - - - - - 
// Lesson Stuff

//.box-model-wrap,
//.no-border,
//.one-border,
//.lesson-border
  display: none

    
    
.one-border .box
  border: 1px solid black
    
.lesson-border .box
  outline: 1px solid black
  
  
  
  
  
              
            
!

JS

              
                
              
            
!
999px

Console