How to Create CSS Section Dividers and Shapes
Section dividers replace flat horizontal lines with dynamic shapes — waves, angles, curves, and triangles that create visual flow between page sections. They're built with CSS clip-path, SVG backgrounds, or pseudo-elements and add polish without any images.
Angled Dividers with clip-path
The simplest divider is an angled edge using CSS clip-path:
.section {
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
padding-bottom: 60px;
}This clips the bottom edge at an angle. The polygon() function takes coordinate pairs (x y) for each corner. Adjust the percentages to change the angle steepness. For an inverted angle on the next section, mirror the coordinates.
SVG Wave Dividers
For organic curves and wave shapes, inline SVGs placed between sections give the most control:
<section class="hero">
…content…
<svg class="wave" viewBox="0 0 1440 120" preserveAspectRatio="none" aria-hidden="true">
<path d="M0,64 C240,112 480,16 720,64 C960,112 1200,16 1440,64 L1440,120 L0,120 Z"
fill="#1A1D2E"/> <!-- colour of the NEXT section -->
</svg>
</section>
.hero { position: relative; }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 80px; display: block; }
The SVG contains a path element with a bezier curve. Position it with position: absolute at the bottom of one section or top of the next. The SVG Wave Generator creates these paths interactively — adjust the curve, complexity, and number of waves, then export the SVG code.
Worked Example: The Hairline Seam at 125% Zoom
A wave pinned with bottom: 0 can leave a thin line of the first section's color showing between the wave and the next section. We tested the markup above in Chromium 141 with a red first section and a blue wave and next section, at four device-pixel ratios (the same thing happens with browser zoom or Windows display scaling), counting red pixels along the joint (script and results in our test folder, October 13, 2026):
| Scale | bottom: 0 | bottom: -1px |
|---|---|---|
| 100% | 0 | 0 |
| 125% | 1,257 — a full-width line | 3 |
| 150% | 6 | 5 |
| 200% | 0 | 0 |
The section was 301.5 px tall, so at 125% its edge fell between device pixels and the rounding left one row uncovered. Overlapping the wave by a pixel (bottom: -1px) removed the line; display: block on the SVG alone did not. Mark decorative SVG dividers aria-hidden="true" so screen readers skip them.
CSS Triangle Dividers
CSS triangles use the border trick on a pseudo-element:
.section::after {
content: '';
position: absolute;
bottom: -40px;
left: 0;
width: 0;
height: 0;
border-left: 50vw solid transparent;
border-right: 50vw solid transparent;
border-top: 40px solid currentColor;
}This creates a downward-pointing triangle centered at the bottom of the section. The triangle's color comes from the section's background.
Making Dividers Responsive
Dividers need to scale with the viewport. Use viewport units for heights and widths: border-top: 5vw solid for triangles, height: 8vw on SVG containers. Test at extreme viewport sizes — a divider that looks elegant at 1200px might be too tall at 1920px or too short at 375px. The CSS Divider Generator outputs responsive dividers that scale correctly across all viewports.
Frequently Asked Questions
How do I create a wave divider between sections?
What is CSS clip-path?
Are CSS dividers responsive?
Use the CSS Divider Generator — free, no signup required.
⚡ Open CSS Divider Generator