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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <div class="container">
  <h1>This is the title of the article</h1>
  <div class="aside"><img src="http://placehold.it/300x300" /></div><div id="blah" class="content">
    <h2>This is a whopping heading</h2>
<p>Bacon ipsum dolor sit amet frankfurter in laborum, biltong beef consectetur proident tri-tip eu laboris.  Esse exercitation beef ball tip salami.  Irure ham hock strip steak turducken beef ribs, shank ham filet mignon fugiat shoulder.  Hamburger eiusmod ea meatball, veniam biltong exercitation eu flank turducken cillum frankfurter officia rump minim.  Pariatur voluptate boudin commodo duis, nostrud mollit beef ribs sirloin pig shank cow.  Prosciutto duis filet mignon est enim bacon deserunt labore ex turkey voluptate spare ribs.  Esse est eu, voluptate culpa tenderloin pork loin in ad flank nostrud consequat laboris bacon ham.</p><p>Dolor chuck voluptate pig.  Jerky corned beef ham, short loin pancetta filet mignon jowl.  Dolore biltong ullamco, chuck adipisicing sausage dolore.  Ut ham hock dolore minim sirloin officia beef aute ground round tempor ad ribeye in irure.  Frankfurter flank dolor, shank mollit filet mignon laborum swine.</p><p>Pastrami velit ea bacon, culpa deserunt in kielbasa labore meatloaf elit dolor.  Et in duis, pancetta qui boudin fugiat ea adipisicing eu meatball.  Sirloin tempor do et salami proident ex cupidatat.  Pork adipisicing culpa enim cow short ribs ex id, bacon corned beef.</p><p>Irure shank beef ribs laborum id ut in shankle tenderloin.  Est anim aute, tail leberkas capicola eu salami ground round.  Non corned beef flank laboris salami hamburger jowl cupidatat irure fatback.  Eu chuck capicola jowl salami frankfurter, spare ribs eiusmod biltong meatball.</p><p>Venison pastrami pancetta esse ground round occaecat shoulder tempor salami ex aliquip.  Quis pork swine jowl meatball, andouille t-bone eu short ribs pork belly.  Prosciutto drumstick quis in.  Beef ribs tri-tip cow spare ribs tail pastrami magna.</p>
</div>
  <div class="footer">Subscribe to <a href="http://responsivedesignweekly.com">Responsive Design Weekly</a></div>
</div>
            
          
!

CSS

            
              * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }

ul, li, p, html, body, h3 {
 padding: 0;
  margin: 0;
}

img {width: 100%;
    max-width: 100%;
}

body {
 font-size: 16px; 
 font-family: helvetica, arial, san-serif;
 background-color: #999;
 color: #333;
}
h1 {
  border-top: 0.3em solid #333;
}
p {
  font-size: 1em;
  line-height:1.6em;
  margin-bottom: 2em;
}

p:first-of-type{
    margin-top: 1.6em;
}

.container {
   width: 100%;
   max-width: 64em;
  margin: 0 auto;
}

.content{

  float:left;
  width: 100%;
  padding: 0 5%;
}

.aside {
  float:left;
  width: 100%;
  color: #f1f1f1;
  height: 300px;
  overflow:hidden;
  margin-bottom: 2em;
}

.footer{
  clear: both;
  background-color: #333333;
  width: 100%;
  height: 5em;
  float: right;
}

.footer a {
  color: #f0f0f0; 
  text-decoration: none; 
  line-height: 5em;
}
.footer a:hover {
  border-bottom: dashed 1px #999;
}


@media screen and (min-width:20em) {
 /*     20.000em /* (320 px)*/ 
   body { 
    background-color: #fff;
  }
}

@media screen and (min-width:30em) {
 /*         30.000em  /* (480 px)*/
 body { 
    background-color: #f1f1f1;
  }
}
  
@media screen and (min-width:31.25em) {
 /*     31.250em  /* (500 px)*/

}  
@media screen and (min-width: 37.5em) {
 /*   	37.500em  /* (600 px)*/
  
}
@media screen and (min-width:48em) {
 /*   	48.000em /*(ackkkkkk, device specific bad)768px*/
  .columns { 
  -webkit-column-count: 2; /* Saf3, Chrome*/
  -webkit-column-gap: 4%; /* Saf3, Chrome*/
  -moz-column-count: 2; /* FF3.5+ */
  -moz-column-gap: 4%; /* FF3.5+ */
  column-count: 2; /* Opera 11+*/
  column-gap: 4%; /* Opera 11+*/
}
}
@media screen and (min-width:50em) {
 /*   	50.000em  /* (800 px)*/
  .content{
  width: 80%;
}
  
 .aside {
   width: 20%; 
  }
  
}
@media screen and (min-width:60em) {
 /*   	60.000em /*(a designers fav)960px */
    .container {
  margin: 5em auto;
}
} 

@media screen and (min-width:64em) {
 /*   	64.000em /* (ackkkkk) 1024px */

} 
@media screen and (min-width:75em) {
 /*   	75.000em  /* (1200 px)*/
  
}  
  
  
@media screen and (min-width:87.5em) {
 /* 	87.500em  /* (1400 px)*/
/*  body {
    font-size: 1.1em;
  }*/
    
}  
  
@media screen and (min-width:100em) {
 /*   		100.000em  /* (1600 px)*/
  body {
    font-size: 1.4em;
  }
}  
  
 @media screen and (max-height:25em) {

  body {background-color: pink;}
  .content {
  -webkit-column-count: 2; /* Saf3, Chrome*/
  -webkit-column-gap: 4%; /* Saf3, Chrome*/
  -moz-column-count: 2; /* FF3.5+ */
  -moz-column-gap: 4%; /* FF3.5+ */
  column-count: 2; /* Opera 11+*/
  column-gap: 4%; /* Opera 11+*/
  }
}       
  


		
		
		
		
		
	
	
            
          
!

JS

            
              var $div = $( '#blah' );
if($div.text().length >= 600) {
    $div.addClass('columns');
}
            
          
!
999px

Console