CSS Zigzag Feature Rows
Feature rows that alternate image and text sides down the page, then stack in order on phones.
Plan
Map the work in minutes.
Build
Ship it with your team.
Launch
Go live with one click.
<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>
.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;
}
}
About this CSS Zigzag Feature Rows
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. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.
CSS features used
Customize it
The colors in this snippet. Search and replace them to match your brand:
#a5b4fc#6366f1#0f172a#475569
How to use this zigzag feature rows
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.feature-zigzagclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).
Building with an AI tool?
“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.