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="grid">
  <div class="header"><h1>CSS Grid is super cool</h1></div>
   <div class="main-content"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque tincidunt sagittis metus, ut varius elit fringilla non. Nulla viverra velit sed lectus dignissim, ac sollicitudin tortor feugiat. Mauris pulvinar tempus purus, eu venenatis odio eleifend quis. Fusce placerat libero mauris, nec euismod lorem sagittis eget. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur auctor rutrum neque, id varius lorem consectetur et. Vivamus convallis ut lorem eget bibendum. Etiam at lacinia metus. </p>
     <p>Fusce nec nisi et massa feugiat euismod et ut enim. Nunc et consequat elit. Phasellus ultricies, erat in dictum eleifend, tellus odio sodales sem, in pulvinar metus dui eu ligula. Integer efficitur convallis neque. Maecenas magna elit, tempor nec elementum vel, tincidunt sit amet ante. In et egestas dolor, eu euismod augue. Nam eu erat in ligula consequat vehicula id eget quam. Vivamus quis dictum turpis.</p></div>
   <div class="side">Side</div>
   <div class="footer">Footer</div>
 
</div>
              
            
!

CSS

              
                *{
  box-sizing:border-box;
}

h1{
  display:none;
}

.grid{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 100px 400px 50px;
  grid-template-areas:
    "head head head head"
    "main main main side"
    "footer footer footer footer";
  font-family:arial, helvetica, sans-serif;
  grid-row-gap:10px;
  padding:10px;

 
}

.grid p{
  padding:0 20px 0 20px;
  line-height:1.75rem
}

.grid h1{
  text-align:center;
   color:#ffffff;
  font-weight:bold;
  justify-content:center;
  text-align:center;
}

.header{
  grid-area:head;
  background-image: linear-gradient(to bottom right, #254e83 , #c8d9f0);
  background-color:#254e83;
  padding-top:10px;
  
}

.main-content{
  grid-area:main;
  background-color:#175d84;
   padding-top:10px;
  color:#ffffff;
}

.side{
  grid-area:side;
  background-color:#c54c2d;
   padding-top:10px;
  color:#ffffff;
  text-align:center;
  display:flex;
  justify-content:center;
  align-items:center;
  border:3px solid #3d2722;
}
.footer{
  grid-area:footer;
  background-color:#8c897a;
  padding-top:10px;
  color:#ffffff;
  text-align:center;
  align-items:center;
  border:1px solid #000000;
  height:100px;
}



              
            
!

JS

              
                $(document).ready (function(){
  $('h1').fadeIn(5000)
  $(".side").delay(5000).css("background","orange")
});
              
            
!
999px

Console