# Zigzag Feature Rows

> Feature rows that alternate image and text sides down the page, then stack in order on phones.

- Category: [CSS Layouts](https://copy-css.com/category/layouts)
- Tags: alternating, image text, landing page, nth-child, order
- Live preview: https://copy-css.com/snippets/zigzag-features
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<section class="feature-zigzag">
  <div class="feature-zigzag-row">
    <div class="feature-zigzag-media"></div>
    <div class="feature-zigzag-text"><h3>Plan</h3><p>Map the work in minutes.</p></div>
  </div>
  <div class="feature-zigzag-row">
    <div class="feature-zigzag-media"></div>
    <div class="feature-zigzag-text"><h3>Build</h3><p>Ship it with your team.</p></div>
  </div>
  <div class="feature-zigzag-row">
    <div class="feature-zigzag-media"></div>
    <div class="feature-zigzag-text"><h3>Launch</h3><p>Go live with one click.</p></div>
  </div>
</section>
```

## CSS

```css
.feature-zigzag {
  display: grid;
  gap: 56px;
  font: 16px/1.5 system-ui, sans-serif;
}

.feature-zigzag-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

/* Every second row puts the image on the right */
.feature-zigzag-row:nth-child(even) .feature-zigzag-media {
  order: 2;
}

.feature-zigzag-media {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: linear-gradient(135deg, #a5b4fc, #6366f1);
}

.feature-zigzag-text h3 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 24px;
}

.feature-zigzag-text p {
  margin: 0;
  color: #475569;
}

@media (max-width: 640px) {
  .feature-zigzag-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-zigzag-row:nth-child(even) .feature-zigzag-media {
    order: 0;
  }
}
```

## Notes

- This CSS Zigzag Feature Rows is 45 lines of pure CSS (0.8 KB) with no JavaScript and no dependencies. It uses linear gradients, CSS Grid and aspect-ratio.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
