Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                <div class="wrapper">
  
  <div class="table">
    
    <div class="row header">
      <div class="cell">
        Name
      </div>
      <div class="cell">
        Age
      </div>
      <div class="cell">
        Occupation
      </div>
      <div class="cell">
        Location
      </div>
    </div>
    
    <div class="row">
      <div class="cell" contenteditable="true">
        Luke Peters
      </div>
      <div class="cell" contenteditable="true">
        25
      </div>
      <div class="cell" contenteditable="true">
        Freelance Web Developer
      </div>
      <div class="cell" contenteditable="true">
        Brookline, MA
      </div>
    </div>
    
    <div class="row">
      <div class="cell" contenteditable="true">
        Joseph Smith
      </div>
      <div class="cell" contenteditable="true">
        27
      </div>
      <div class="cell" contenteditable="true">
        Project Manager
      </div>
      <div class="cell" contenteditable="true">
        Somerville, MA
      </div>
    </div>
    
    <div class="row">
      <div class="cell" contenteditable="true">
        Maxwell Johnson
      </div>
      <div class="cell" contenteditable="true">
        26
      </div>
      <div class="cell" contenteditable="true">
        UX Architect & Designer
      </div>
      <div class="cell" contenteditable="true">
        Arlington, MA
      </div>
    </div>
    
    <div class="row">
      <div class="cell" contenteditable="true">
        Harry Harrison
      </div>
      <div class="cell" contenteditable="true">
        25
      </div>
      <div class="cell" contenteditable="true">
        Front-End Developer
      </div>
      <div class="cell" contenteditable="true">
        Boston, MA
      </div>
    </div>
    
  </div>
  
</div>
              
            
!

CSS

              
                body
  font-family: 'Helvetica Neue', Helvetica, Arial
  font-size: 14px
  line-height: 24px
  font-weight: 400
  color: #3b3b3b
  -webkit-font-smoothing: antialiased
  font-smoothing: antialiased
  background: #2b2b2b

.wrapper
  margin: 0 auto
  padding: 40px
  max-width: 800px

.table
  margin: 0 0 40px 0
  width: 100%
  box-shadow: 0 1px 3px rgba(0,0,0,0.2)
  display: table
  @media screen and (max-width: 580px)
    display: block

.row
  display: table-row
  background: #f6f6f6
  &:nth-of-type(odd)
    background: #e9e9e9
  &.header
    font-weight: 900
    color: #ffffff
    background: #ea6153
  &.green
    background: #27ae60
  &.blue
    background: #2980b9
  @media screen and (max-width: 580px)
    padding: 8px 0
    display: block

.cell
  padding: 6px 12px
  display: table-cell
  @media screen and (max-width: 580px)
    padding: 2px 12px
    display: block

[contenteditable]:after
  width: 8px
  height: 8px
  display: inline-block
  content: ' '  
    
[contenteditable]:hover:after
  content: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiUlEQVQ4y2NgGFKgs7OTl2zNEyZMmAgEDZMmTeogWTNQUwVQcyeIDaLnz5/PQYrmssmTJ1sC6QQg7gXiFlI0l4I0Q9lOQNuLiNYMVFwCxFZQtiPQgEKSNAM1WMM0k2wzTDPQ+Q5AdjEpfs6CRRPJmqEGvAC6IAlId4NcQk58vwDih0DbMxhGDgAAx6ZVXMd4yEMAAAAASUVORK5CYII=')

[contenteditable]:focus:after
  width: 0
  content: ''
              
            
!

JS

              
                
              
            
!
999px

Console