Skip to content

Wave Section Dividers

Pure CSS and inline SVG section dividers with wave, layered wave, curve and tilt shapes that inherit the next section's color and stretch to any width.

Also known as: wave divider, section separator, curved section divider, svg wave shape

Wave Section Dividers live demo

Open in new tab

Pure CSS code (HTML, CSS)

Wave section dividers in pure CSS and inline SVG: a smooth wave, a three-layer wave, a single curve and a diagonal tilt that join colored page sections without a hard horizontal line. They are a quick way to give landing pages, portfolios and marketing sites a softer, more organic rhythm.

How it works

The demo is a .wd-page wrapper with five .wd-section blocks in sand, teal, forest green, cream and coral. Each section that needs an edge contains a .wd-divider as its last child. The divider is absolutely positioned at the bottom of the section, spans the full width and has a fixed height from --wd-height. A bottom: -1px offset hides the hairline gap browsers sometimes leave between the SVG and the next section.

Inside, the svg uses preserveAspectRatio="none", so the shape stretches to any width while keeping its height, and fill: currentColor. The divider's text color therefore decides the shape color: a modifier such as .wd-divider--to-teal sets color to the next section's background, so the shape looks like the top of the following block rising into the current one. The section's bottom padding adds the divider height, so text never sits under the shape.

The layered variant stacks three paths in one SVG; .wd-layer-back and .wd-layer-mid are translucent copies that create depth. .wd-divider--flip mirrors any shape horizontally, which turns the tilt into a slope in the opposite direction. No JavaScript is used.

Customization

  • --wd-sand, --wd-teal, --wd-forest, --wd-cream and --wd-coral on .wd-page: change the palette; sections and divider fills update together.
  • --wd-height and --wd-height-tall: the divider heights (70px / 100px on phones, 110px / 150px from 768px); larger values make the waves more dramatic.
  • Swap a .wd-divider--to-* class to match whichever section follows, e.g. .wd-divider--to-coral.
  • Add .wd-divider--flip to mirror a shape left to right, or .wd-divider--invert to turn it upside down.
  • Add .wd-divider--tall for a taller divider; the parent section adds matching bottom padding automatically.
  • Change the opacity of .wd-layer-back and .wd-layer-mid to make the layered wave more or less transparent.
  • Replace the d attribute of a path to draw your own shape inside the 0 0 1440 120 viewBox; keep the bottom edge closed at 120.

Use cases

  • Landing pages: a smooth wave joins a sand-colored hero to the teal section below it
  • Portfolios: a layered three-wave divider adds depth between content blocks
  • Marketing sites: curve and diagonal tilt shapes give pages a softer, more organic rhythm
  • Colored section stacks: each divider takes the next section's color and stretches to any width

Accessibility

Dividers are purely decorative: every .wd-divider has aria-hidden="true", the SVGs have focusable="false", and pointer-events: none keeps them from blocking clicks on content above. Each section is labelled by its own heading via aria-labelledby. Text colors were chosen to contrast with each background, including white on the darkened teal. There is no animation, so no reduced-motion handling is needed.

Usage notes

The tall-divider padding uses the :has() selector, supported in all current browsers; in older ones the section simply keeps its normal padding. To use a divider at the top of a section instead, place it as the first child, set top: -1px instead of bottom, and add .wd-divider--invert.

Wave Section Dividers at a glance

Framework
Pure CSS
Code
HTML, CSS
JavaScript
Not needed, CSS only
Dependencies
None
Layout
Responsive, works on mobile
Category
Shapes & Dividers
License
Free for personal and commercial use

Questions about this template

Can I use the Wave Section Dividers code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

There is nothing to install. Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. It is built with HTML and CSS only, so there is no JavaScript to load.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

No dependencies. Pure HTML, CSS and JavaScript.

Wave Section Dividers – free Pure CSS shape & divider template
Wave Section Dividers · free Pure CSS shape & divider template

More Shapes & Dividers

Curved Section with Photo Clip-Path – free Pure CSS shape & divider template

Curved Section with Photo Clip-Path

Full-width photo hero with a responsive curved bottom edge made with CSS clip-path ellipse, plus a three-column feature row below.