Pen Settings



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


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


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.


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.


                <link href="" rel="stylesheet">
<div class="cards clearfix">  
  <div class="card-col-1"></div>
  <div class="card-col-2"></div>
  <div class="card-col-3"></div>


  padding: 0;
  margin: 0;
  font-family: 'Roboto';
  box-sizing: border-box;

  background: #f1f1f1;

  width: 90%;
  max-width: 960px;
  margin: 60px auto;
  padding: 1rem;

  width: 100%;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
  border-radius: 0 0 4px 4px;
  float: left;
  margin-bottom: 12px;

  content: '';
  display: table;
  clear: both;

  position: relative;
  background: url( #d2d2d2;
  background-position: center center;
  background-repeat: no-repeat;
  height: 0;
  border-radius: 4px 4px 0 0;

.top img{
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 4px 4px 0 0;
  display: block;

  padding: 1rem;
  background: #fff;
  border-radius: 0 0 4px 4px

  width: calc(33.3333333% - 12px);
  margin: 0 6px;
  float: left;

.card h2{
  font-weight: 300;
  margin-bottom: 1rem;

.card p{
  color: #888;
  font-weight: 300;
  line-height: 1.4;


                function random(min, max){
  return Math.floor(Math.random()*(max-min+1)+min);

function getTitle(){
  var a = ['Lorem', 'Ipsum', 'Dolor', 'Sit', 'Amet', 'Dolorium'];
  var b = random(2, 6);
  var c = '';
  for(var i = 0; i < b; i++){
    c += a[i] + ' ';
  return c;

function getBody(){
  var a = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer iaculis, ligula eget molestie suscipit, ipsum libero convallis elit, a cursus enim metus nec enim.';
  var b = random(80, 160);
  var c = a.substr(0, b);
  var d = c.substr(0, Math.min(c.length, c.lastIndexOf(" ")));
  return d;

for(var i = 0; i < 10; i++){
  for(var j = 1; j < 4; j++){
    var randomImageHeight = random(240, 340);
    var relation = 280/randomImageHeight;
    var padding = 100/relation;
    <div class="card">
      <div class="top" style="padding-bottom: ${padding}%">
        <img src="${randomImageHeight}/?random&sig=${Math.random()}">
      <div class="bottom">