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.

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="container">
  <div class="box">
    <div class="content">
      <img src="https://image.flaticon.com/icons/svg/2377/2377010.svg" alt="">
      <p>Wash hands with soap and water after touching animals and animal products.</p>
    </div>
  </div>
  <div class="box">
    <div class="content">
      <img src="https://image.flaticon.com/icons/svg/619/619404.svg" alt="">
      <p>When coughing and sneezing cover mouth and nose with flexed elbow or tissue.</p>
    </div>
  </div>
  <div class="box">
    <div class="content">
      <img src="https://image.flaticon.com/icons/svg/655/655820.svg" alt="">
      <p>Avoid travelling if you have a fever or cough.</p>
    </div>
  </div>
  <div class="box">
    <div class="content">
      <img src="https://image.flaticon.com/icons/svg/2217/2217528.svg" alt="">
      <p>If you have a fever, cough and difficulty breathing, seek medical care early.</p>
    </div>
  </div>
  <div class="box">
    <div class="content">
      <img src="https://image.flaticon.com/icons/svg/2599/2599564.svg" alt="">
      <p>If you are coughing or sneezing, wear musk and must know how to use it and dispose it properly.</p>
    </div>
  </div>
  <div class="box">
    <div class="content">
      <img src="https://image.flaticon.com/icons/svg/1973/1973685.svg" alt="">
      <p>Eat only well cooked food.</p>
    </div>
  </div>
  <div class="box">
    <div class="content">
      <img src="https://image.flaticon.com/icons/svg/2002/2002516.svg" alt="">
      <p>Avoid close contact with animals that are sick.</p>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Rubik:300,400,500&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-self: center;
  min-height: 100vh;
  background: #222;
}

.container {
  position: relative;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-template-rows: minmax(100px, auto);
  margin: 40px;
  grid-auto-flow: dense;
  grid-gap: 10px;
}

.container .box {
  color: #929796;
  background: #333;
  padding: 20px;
  display: grid;
  font-size: 20px;
  place-items: center;
  text-align: center;
  color: #fff;
  transition: 0.5s;
}

.container .box:hover {
  background: #e91e63;
}

.container .box img {
  position: relative;
  max-width: 100px;
  margin-bottom: 10px;
}

.container .box:nth-child(1) {
  grid-column: span 2;
  grid-row: span 1;
}

.container .box:nth-child(2) {
  grid-column: span 1;
  grid-row: span 2;
}

.container .box:nth-child(4) {
  grid-column: span 1;
  grid-row: span 2;
}

.container .box:nth-child(5) {
  grid-column: span 3;
  grid-row: span 1;
}

@media (max-width: 991px) {
  .container {
    grid-template-columns: repeat(auto-fill, minmax(50%, 1fr));
    grid-template-rows: minmax(auto, auto);
  }
  .container .box {
    grid-column: unset !important;
    grid-row: unset !important;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console