cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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.

Quick-add: + add another resource

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.

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>
  <article>
    <h1>Lorem ipsum dolor</h1>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/teaser-cad-demo-image.jpg" alt="a little town" />
    <p>Lorem ipsum dolor sit amet consectetur adipiscing, elit inceptos nunc et litora, cras class id morbi viverra. </p>
  </article>
  
  <article>
    <h1>Nullam bibendum </h1>
    <p>Hendrerit augue, sed tempus odio sagittis nec. Ut ipsum lorem, scelerisque ac vestibulum et, tincidunt eget urna. </p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-meric-dagli-388890-unsplash.jpg" alt="generic image">
  </article>
  
  <article>
    <h1>Vivamus ac euismod ante</h1>
    <p>Hendrerit augue, sed tempus odio sagittis nec.</p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-dmitri-popov-93222-unsplash.jpg" alt="generic image" />
  </article>

  <article>
    <h1>Vivamus ut risus porttitor</h1>
    <p>Porttitor ligula a, maximus risus. Donec maximus vulputate mauris, vel placerat diam interdum eu.</p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-dmitri-popov-78926-unsplash.jpg" alt="generic image" />
  </article>
  
  <article>
    <h1>Vivamus ut risus porttitor</h1>
    <p>Porttitor ligula a, maximus risus.</p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-simone-hutsch-384848-unsplash.jpg" alt="generic image" />
  </article>
  
  <article>
    <h1>Maecenas a urna metus</h1>
    <p>Vivamus ac euismod ante.</p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-joel-filipe-163662-unsplash.jpg" alt="generic image">
  </article>
  
  <article>
    <h1>Lorem ipsum dolor</h1>
    <p>Lorem ipsum dolor sit amet consectetur adipiscing, elit inceptos nunc et litora, cras class id morbi viverra.</p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-dmitri-popov-326976-unsplash.jpg" alt="generic image" />
  </article>
  
  <article>
    <h1>Nullam bibendum </h1>
    <p>Hendrerit augue, sed tempus odio sagittis nec. Ut ipsum lorem, scelerisque ac vestibulum et, tincidunt eget urna. Phasellus pellentesque nec urna id elementum. </p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-joel-filipe-163662-unsplash.jpg" alt="generic image">
  </article>
  
  <article>
    <h1>Lorem ipsum dolor</h1>
    <p>Lorem ipsum dolor sit amet consectetur adipiscing, elit inceptos nunc et litora, cras class id morbi viverra.</p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-kimon-maritz-183501-unsplash.jpg" alt="generic image" />
  </article>
  
  <article>
    <h1>Maecenas a urna metus</h1>
    <p>Vivamus ac euismod ante.</p>
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/10558/ARCH-simone-hutsch-384853-unsplash.jpg" alt="generic image" />
  </article>
  
</main>
            
          
!
            
              * { box-sizing: border-box; }
body { margin: 5vh; font-family: Avenir, Roboto, Helvetica, san-serif; background: #999;}
div {  height: 90vh; }

main { 
  display: grid;
  grid-template-columns: 4fr 2fr 1fr;
  grid-auto-rows: 28vh;
  grid-gap: 3rem;
}

aarticle:nth-of-type(1) {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

article {
  display: grid; 
  grid-template-columns: 1fr minmax(0, 30ch) 1fr;
  grid-template-rows: 20% 2fr auto auto 1fr;
  width: 100%;
  height: 100%;
}
h1 {
  grid-column: 2 / 4;
  grid-row: 3 / 4;
  align-self: end;
  background: black;
  color: white;
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: normal;
}
img {
  grid-column: 1 / 3;
  grid-row: 1 / 6;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}
p {
  grid-column: 2 / 4;
  grid-row: 4 / 5;
  align-self: start;
  background: white;
  padding: 0.5rem 1rem;
  margin: 0;
  font-size: 90%;
}

            
          
!
999px
Loading ..................

Console