cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <main>
  <section>
    <div class="content">
      <div class="title">
        <h1>Lorem ipsum dolor sit amet</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/400x300" />
      </div>

      <div class="copy">
        Sed auctor libero nisl, at molestie elit pretium congue. Aenean erat dui, tempor ut eros ac, pulvinar ullamcorper metus. Sed quis tempus metus. Curabitur dictum ante a lobortis pretium.
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Consectetur adipiscing elit</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/400x300" />
      </div>

      <div class="copy">
        <p>Pellentesque eget lacus a mi sodales tincidunt. Donec risus ligula, porttitor eu venenatis vitae, tincidunt sed velit. In nec ante eu elit malesuada convallis. Morbi mauris turpis, pulvinar nec turpis sed, luctus semper quam. In maximus faucibus
          erat.</p>
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
        <a href="#">Find a Location</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Quisque nisi mauris</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/800x450" />
      </div>

      <div class="copy">
        <ul>
          <li>Praesent hendrerit ex vel quam aliquam cursus sit amet ac neque.</li>
          <li>Sed elementum suscipit nisl nec finibus. Aenean eu arcu nibh.</li>
          <li>Duis tincidunt massa luctus dictum viverra.</li>
          <li>Integer tempus quam id eleifend luctus.</li>
          <li>Quisque feugiat, metus at aliquam vehicula, ligula ipsum sodales sem, sed consectetur ipsum diam molestie est.</li>
          <li>Integer bibendum vestibulum porta.</li>
          <li>Fusce mattis commodo justo ac accumsan.</li>
          <li>Fusce efficitur est quis viverra ultricies.</li>
        </ul>
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Varius nec massa id</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/400x300" />
      </div>

      <div class="copy">
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Aenean sit amet diam a orci pellentesque cursus</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/300x400" />
      </div>

      <div class="copy">
        <p>Proin pharetra feugiat ex, quis faucibus mauris blandit sed. Sed luctus aliquam pretium. In cursus ac dolor eget aliquam. Donec ac porta nisl. Fusce sed augue et magna cursus facilisis. Donec sapien metus, faucibus non congue eu, rhoncus sit amet
          felis. Nam id nisi hendrerit, molestie neque sed, sollicitudin diam.</p>
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Curabitur at laoreet purus</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/400x300" />
      </div>

      <div class="copy">
        <p>Aenean eu finibus felis. Morbi eros lectus, vehicula a leo in, aliquet gravida purus. Donec condimentum elit eget blandit semper.</p>
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
        <a href="#">Find a Location</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Morbi mattis tortor eget tortor convallis facilisis</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/400x300" />
      </div>

      <div class="copy">
        <p>Morbi semper, lacus in malesuada volutpat, nulla elit placerat turpis, quis volutpat ligula orci at nisi. Fusce sapien leo, tincidunt eu risus euismod, tempor sollicitudin enim. Integer tincidunt accumsan velit.</p>
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Cras aliquet facilisis quam</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/400x300" />
      </div>

      <div class="copy">
        <table>
          <thead>
            <tr>
              <th>Morbi semper</th>
              <th>Lacus in malesuada</th>
              <th>Nulla elit placerat</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td>Etiam porta ligula ac mauris maximus, a dapibus sem tempus.</td>
              <td>Nulla rutrum quam ac orci congue tincidunt. Donec dignissim purus magna, vitae lacinia est rhoncus vitae.</td>
              <td>Phasellus lectus eros, mollis quis enim at.</td>
            </tr>

            <tr>
              <td>Class aptent taciti sociosqu ad litora torquent per conubia nostra.</td>
              <td>Nunc nibh lectus, auctor tristique odio sit amet, tempus molestie nunc.</td>
              <td>Praesent nec pellentesque enim. Maecenas sed magna ut libero eleifend ultricies lobortis id arcu.</td>
            </tr>

            <tr>
              <td>Suspendisse a molestie lectus.</td>
              <td>Morbi et varius ante, vel bibendum odio.</td>
              <td>Curabitur accumsan ultrices arcu, vel consequat nisl ultrices in. </td>
            </tr>
          </tbody>
        </table>
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Eget ornare eros tincidunt nec</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/800x450" />
      </div>

      <div class="copy">
        <p>Phasellus faucibus maximus blandit. Suspendisse ultrices tortor ac ligula sollicitudin varius. Vestibulum porta vehicula quam nec gravida. Integer eu nisl eget enim molestie porta.</p>
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
        <a href="#">Find a Location</a>
      </div>
    </div>
  </section>

  <section>
    <div class="content">
      <div class="title">
        <h1>Phasellus nec tristique lacus</h1>
      </div>

      <div class="media">
        <img src="http://placehold.it/400x300" />
      </div>

      <div class="copy">
        <p>Phasellus enim neque, vestibulum non efficitur eu, mollis sed neque. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
      </div>

      <div class="link">
        <a href="#">Learn More</a>
        <a href="#">Request a Quote</a>
      </div>
    </div>
  </section>

</main>
            
          
!
            
              body {
  padding: 4vw;
  font-family: sans-serif;
}

img {
  max-width: 100%;
  margin: 0 auto;
}

main {
  display: -ms-grid;
  -ms-grid-columns: 300px 2vw 300px 2vw 300px;
  
  display: grid;
  grid-gap: 2vw;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

section {
  background: #e6e6f6;
  padding: 2vw;
}

.link a {
  display: block;
  padding: 1rem;
  margin: 1rem 0;
}

.link a:link,
.link a:visited {
  background: #333;
  color: #f3f3f3;
  text-decoration: none;
}

.link a:hover,
.link a:active {
  background: #000;
  color: #fff;
  text-decoration: underline;
}

.link a:last-child {
  margin-bottom: 0;
}

section {
  display: grid;
}

.content {
  background: #f9f9f9;
}

.media {
  grid-row: -1;
}

.link {
  align-self: end;
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console