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

              
                <section id="artists">
  <h2>Our Artists</h2>
  <div class="articlewrap">
    <article>
      <h4>Mixed Media</h4>
      <h3>Anni Roenkae</h3>
      <img src="https://assets.codepen.io/296057/fem-rebel-yell.jpg" alt="Rebel Yell - triangles of red, green, orange, yellow, and grey." />
      <p>Anni Roenkae is a visual artist based in Finland.</p>
      <p> <a href="https://www.anniroenkae.com" target="_blank">Visit website</a></p>
    </article>

    <article>
      <h4>Wallpaper</h4>
      <h3>Ben Neale</h3>
      <img src="https://assets.codepen.io/296057/fem-wallpaper.jpg" alt="Grey squares with deep wells of aqua, with white lines in between the squares." />
      <p>Ben Neale is a photographer and designer, based out of Adelaide, Australia.</p>
      <p><a href="https://www.pexels.com/@ben-neale-123878" target="_blank">Visit website</a></p>

    </article>

    <article>
      <h4>Artwork</h4>
      <h3>Sharon McCutcheon</h3>
      <img src="https://assets.codepen.io/296057/fem-drip.jpg" alt="A rainbow of shiny paint drips." />
      <p>Sharon McCutcheon specializes in LGBTQIA+ themes, stock photos, macro images, backgrounds, and colorful visuals.</p>
      <p><a href="https://unsplash.com/@sharonmccutcheon" target="_blank">Visit website</a></p>

    </article>

    <article>
      <h4>Photography</h4>
      <h3>Francesco Ungaro</h3>
      <img src="https://assets.codepen.io/296057/fem-invader.jpg" alt="A dirty yellow wall with a rust-color 8-bit space invader." />
      <p>Francesco Ungaro is a strategy and presentation consultant and photography lover, based in Milan.</p>
      <p><a href="https://www.ghostpresenter.it/" target="_blank">Visit website</a></p>
    </article>
  </div>
</section>
              
            
!

CSS

              
                .articlewrap {
  display: flex;
  flex-flow: column wrap;
  gap: 1rem;
}
.articlewrap article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(5, auto);
  gap: 0 1rem;
}
.articlewrap article * {
  grid-column: 2/3;
  margin-top: 0;
}
.articlewrap article img {
  grid-column: 1/2;
  grid-row: 1/6;
}
#artists h4 {
  text-transform: uppercase;
  font-weight: normal;
  font-size: 0.8rem;
  margin: 0;
}
#artists h3 {
  margin-top: 0.3em;
}

@media (min-width: 650px) {
  .articlewrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(10px, 1fr));
  }
}

@media (min-width: 1000px) {
  .articlewrap {
    grid-template-columns: repeat(4, minmax(10px, 1fr));
  }
  .articlewrap article {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, auto);
    gap: 0 1em;
  }
  .articlewrap article * {
    grid-column: 1/2;
  }
  .articlewrap article img {
    grid-column: 1/2;
    grid-row: auto;
    margin-bottom: 1rem;
  }
}

/* default styling, no changes needed here */

/* set the layout to border box model */
html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
/* set font family and background gradient */
body {
  padding: 0;
  border: 0;
  font-family: Arial, sans-serif;
}
img {
  width: 100%;
}

              
            
!

JS

              
                
              
            
!
999px

Console