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 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

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

              
                <div class="page">
  <div class="list-container">
    <div class="list-item">
      <div class="item-section-1">sd  mjfmsqjre gj rjgmj</div>
      <div class="item-section-2">zea nzeflkn lfhzelghalrg elrhg lrglhgl ge g </div>
      <div class="item-section-3">zegnzge z ee blgez ljgnl n ezgn</div>
      <div class="item-section-4">ze zeg elf </div>
      <div class="item-section-5">je krzgkjdfkj gk bb fekjjkdskjs o o o o o  ok k j kj kn kn </div>
    </div>
    <div class="list-item">
      <div class="item-section-1">sd  mjfmsqjre gj rjgmj</div>
      <div class="item-section-2">zea nzeflkn </div>
      <div class="item-section-3">zegnzge z ee blgez ljgnl n ezgn</div>
      <div class="item-section-4">ze zeg elf </div>
      <div class="item-section-5">je krzgkjd</div>
    </div>
    <div class="list-item">
      <div class="item-section-1">sd  mjfmsqjre gj rjgmj</div>
      <div class="item-section-2">zea nzeflkn </div>
      <div class="item-section-3">zegnzge z ee blgez ljgnl n ezgn</div>
      <div class="item-section-4">ze zeg elf d nslvn dlfbdnf jndjf;nbdfjn lkn,ds klgl dj gkldjfls jfdl jd kljfl kdlf </div>
      <div class="item-section-5">je krzgkjd</div>
    </div>
    <div class="list-item">
      <div class="item-section-1">sd  mjfmsqjre gj rjgmj</div>
      <div class="item-section-2">zea nzeflkn </div>
      <div class="item-section-3">zegnzge z ee blgez ljgnl n ezgn</div>
      <div class="item-section-4">ze zeg elf d nslvn dlfbdnf</div>
      <div class="item-section-5">je krzgkjd</div>
    </div>
    <div class="list-item">
      <div class="item-section-1">sd  mjfmsqjre gj rjgmj</div>
      <div class="item-section-2">zea nzeflkn </div>
      <div class="item-section-3">zegnzge z ee blgez ljgnl n ezgn</div>
      <div class="item-section-4"><strong>auto STRETCHES TO THE NEEDED HEIGHT</strong> ze zeg elf d nslvn dlfbdnf gfkgk geg b kdhs bsdg hrsjd jfkdsb gkhgsdklg hbsk k gzqgdqk gfksqdhfkjhsqdjkf hsqjdkhfjklshd jklh dsgds g s</div>
      <div class="item-section-5">je krzgkjd</div>
    </div>
    <div class="list-item">
      <div class="item-section-1">sd</div>
      <div class="item-section-2"><strong>fixed height OVERFLOW IS HIDDEN</strong> zea nzeflkn gds kg skgh klshk geksg ks dgk gg dsbkfbsqd jkdbgkqb  qkskfsfjjfjf jfjj fj ezjhfk hkh fkzhd kzhkhf kjqdh gjkfs qdhsd hqklh jklhg jkshld</div>
      <div class="item-section-3">zegnzge z ee blgez ljgnl n ezgn</div>
      <div class="item-section-4">ze zeg</div>
      <div class="item-section-5">je krzgkjd</div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                .page {
    width: 640px;
    margin: 0 auto;
    border: 1px solid black;
}

.list-container,
.list-item,
[class*="item-section-"] {
    padding: 1px;
    margin: 1px;
}

.list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 1rem;
}
.list-item {
    display: grid;
    grid-template-rows: repeat(5, 100px);
    grid-template-rows: repeat(5, auto);
/*     Only ONE can be 'auto'! */
    grid-template-rows: 75px 75px 75px auto 75px;
}

.item-section-1 {
    background: pink;
}
.item-section-2 {
    background: blue;
}
.item-section-3 {
    background: orange;
}
.item-section-4 {
    background: green;
}
.item-section-5 {
    background: tomato;
}

strong {
  color: red;
  background: #fff
}
              
            
!

JS

              
                
              
            
!
999px

Console