Home › Developer Tools › CSS Shape Divider Generator

CSS Shape Divider Generator

Give the edge between two page sections a wave, curve, slant, arrow or mountain shape. Pick a shape, set its height, width, color and direction, preview it on a mock section and copy responsive HTML and CSS built from a tiny inline SVG.

Last updated:

Position

    

Place the HTML inside the section that gets the divider and give that section position: relative.

Advertisement
Advertisement

How to use the CSS Shape Divider Generator

  1. Choose a shape in the gallery.
  2. Pick top or bottom and set the divider color to the color of the neighbouring section. The section color only changes the preview.
  3. Tune height and width, flip or invert the shape, and optionally set a separate mobile height.
  4. Copy the HTML into the section that gets the divider and give that section position: relative.
  5. Copy the CSS into your stylesheet, or use the CSS background only tab if you cannot add HTML.

How the divider code works

The generator outputs three small pieces that work together:

  1. A wrapper (.shape-divider-bottom or -top) that is absolutely positioned at the edge of the section, spans 100% of its width and hides overflow. line-height: 0 removes the gap an inline SVG would otherwise leave.
  2. An inline SVG with a 1200 × 120 viewBox. Each shape is one closed path: the drawn outline runs from the left edge to the right edge and is closed along the bottom, so the filled part touches the section edge.
  3. CSS that sets the SVG's height (and optional width above 100%), flips it with rotateY(180deg) when needed, and colors it through .shape-fill { fill: … }.

Because the shape is vector data stretched with preserveAspectRatio="none", it is crisp on every screen and the same code works from phones to ultra-wide monitors.

Choosing a divider shape

ShapeFeelTypical height
Wave, layered waves, rippleFriendly, organic, playful60–150px
Curve, asymmetric curveSoft and modern, good under hero images50–120px
TiltDynamic, sporty, startup landing pages40–120px
Triangle, arrowPoints the eye to the next section or a call to action30–100px
Zigzag, pyramidsBold, retro or festive20–60px
Mountains, cloudsTravel, outdoors, kids and weather themes80–180px
BookEditorial, magazine or education sites40–100px

Tips

  • Add bottom padding to the section at least as large as the divider height so text never runs under the shape.
  • Set a smaller mobile height: a 150px wave on a 360px-wide phone looks much steeper than on a desktop.
  • Stretching the width to 150–200% flattens waves and curves into a calmer, more subtle edge.
  • To make the divider look like part of the next section, use exactly the same hex color for the divider and that section's background.

Frequently asked questions

What is a shape divider?

A decorative edge between two website sections, such as a wave or a slant, instead of a straight horizontal line. It is usually an SVG positioned at the top or bottom of a section and filled with the color of the section next to it, so the two sections appear to flow into each other.

Why does the SVG use preserveAspectRatio="none"?

It lets the shape stretch to the full width of the section while keeping the height you set in CSS. Without it, the SVG would keep its 10:1 proportions and either leave gaps or grow very tall on wide screens.

Why is the width calc(100% + 1.3px)?

Browsers sometimes round sub-pixel widths and leave a hairline gap at the right edge of a stretched SVG. Adding about one pixel hides that gap. The parent has overflow: hidden, so nothing spills out.

How do I put the divider at the top of a section?

Choose Top. The CSS then anchors the wrapper at top: 0 and rotates it 180 degrees so the shape points into the section. Use the color of the section above as the divider color.

Can I use a divider without editing the HTML?

Yes. The CSS background only tab encodes the SVG into a data URI for background-image, positioned at the top or bottom of the section. It is handy in page builders that only allow custom CSS. Note that a background sits behind the content, so leave padding for it.

Will shape dividers slow down my site?

No. Each divider is a few hundred bytes of inline SVG, needs no extra request and is hidden from screen readers with aria-hidden, so it does not affect accessibility either.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

SVG Wave GeneratorMake layered SVG waves for section dividers and export SVG, PNG or a CSS background.CSS Background Pattern GeneratorMake pure-CSS stripes, dots, checkerboard, zigzag and grid backgrounds and copy the code.CSS Clip-Path GeneratorDraw CSS clip-path shapes by dragging points: polygons, circle, ellipse and inset. Copy the CSS.SVG Blob GeneratorGenerate random organic SVG blob shapes with gradients and export SVG, PNG or CSS clip-path.Open Graph PreviewPaste OG tags and preview how links look on Facebook, X and LinkedIn.YouTube Embed Code GeneratorCreate responsive YouTube embed code with start time, autoplay, loop and privacy mode.CSS Box Shadow GeneratorDesign layered CSS box shadows with a live preview, presets and one-click Copy CSS.CSS Border Radius GeneratorRound each corner, draw elliptical 8-value radii or random blob shapes and copy the CSS.CSS Button GeneratorDesign CSS buttons with gradients, borders, shadows and hover and active states, then copy the code.CSS Flexbox GeneratorBuild flexbox layouts visually: set container and item properties, then copy the CSS and HTML.Twitter Card GeneratorCreate X / Twitter Card meta tags with Open Graph fallbacks, character counters and a live preview.CSS Grid GeneratorDraw CSS grid layouts: set tracks and gaps, drag to name areas, then copy the CSS and HTML.PX to REM ConverterConvert px to rem or em and back, with a 1-100px table and a whole-CSS converter.Glassmorphism CSS GeneratorDesign frosted-glass UI cards with blur, transparency and border sliders, then copy the CSS.CSS Text Shadow GeneratorLayer CSS text shadows with a live preview and neon, 3D, outline and retro presets.HTML Editor (Live Preview)Write HTML, CSS and JavaScript and see a live, sandboxed preview as you type.HTML to JSX ConverterConvert HTML to valid React JSX: className, htmlFor, style objects, self-closing tags and events.CSS Animation GeneratorCreate CSS keyframe animations from 23 presets with live preview, timing controls and Copy CSS.CSS Triangle GeneratorMake CSS triangles in 8 directions with the border trick or clip-path. Set size and color, copy CSS.CSS Loader GeneratorPick from 14 pure CSS spinners and loaders, set color, size and speed, then copy the HTML and CSS.Cubic Bezier GeneratorDrag the control points to design a CSS easing curve, compare it with linear and copy cubic-bezier().CSS Filter GeneratorAdjust blur, brightness, contrast, hue, sepia and drop-shadow on an image and copy the CSS filter.CSS Specificity CalculatorCalculate CSS selector specificity (a, b, c), including :is(), :not(), :has() and :where(), and compare.Google Maps Embed GeneratorTurn an address or coordinates into responsive Google Maps iframe embed code, no API key.Neumorphism CSS GeneratorDesign soft UI neumorphic shapes with live preview and copy the box-shadow CSS.CSS Clamp GeneratorTurn min/max sizes and viewport widths into a fluid CSS clamp() value in rem and vw.CSS @font-face GeneratorTurn font files or URLs into ready-to-paste @font-face rules with weights, styles and a preview.CSS Media Query GeneratorBuild @media rules for widths, orientation, dark mode and hover, or get framework breakpoints.CSS Scrollbar GeneratorStyle scrollbars: width, colors, radius and hover, with ::-webkit-scrollbar and scrollbar-color CSS.CSS Sprite GeneratorPack many icons into one sprite sheet PNG and get CSS classes with background-position.CSS Text Gradient GeneratorMake gradient text with background-clip:text: color stops, angle, font preview and fallback CSS.CSS Toggle Switch GeneratorDesign pure-CSS toggle switches: size, colors, shape and animation. Copy accessible HTML + CSS.CSS Tooltip GeneratorBuild pure CSS tooltips: position, arrow, colors, padding and animation. Copy HTML and CSS.HTML Form BuilderDrag and drop form fields with labels and validation, then copy accessible HTML and CSS code.Iframe GeneratorCreate iframe embed code: size or responsive ratio, border, allow, sandbox, lazy load, live preview.PX to VW ConverterConvert pixels to vw and vh for any viewport size, and vw/vh back to px, with breakpoint tables.SVG Path EditorEdit an SVG path d attribute visually: drag points, edit commands, convert, scale and minify.SVG to CSS Data URITurn SVG code into a small URL-encoded data URI for CSS backgrounds, with Base64 size comparison.Web App Manifest GeneratorCreate a PWA manifest.json and every app icon size from one image, downloaded as a ZIP.CSS Color Filter GeneratorTurn a HEX color into a CSS filter that recolors black icons and SVGs, with an accuracy score.CSS Gradient Animation GeneratorCreate animated gradient backgrounds: pick colors, angle and speed, preview live and copy the CSS.CSS Hover Effects GeneratorPick button, link and image hover effects, tweak colors and timing, and copy the HTML and CSS.CSS InlinerMove CSS from style blocks into inline style attributes so HTML emails render in every client.CSS Transform GeneratorRotate, scale, skew and translate an element with sliders and copy the CSS transform code.Font Pairing ToolPreview Google Font heading and body pairs on real layouts and copy the embed code and CSS.HTML Accessibility CheckerPaste HTML to find WCAG accessibility problems with impact level, the failing element and a fix.HTML Image Map GeneratorDraw clickable rectangle, circle and polygon hotspots on an image and get image map HTML.SVG ViewerOpen or paste SVG code to preview it live with zoom, backgrounds, size info and PNG export.Pathfinding VisualizerAnimate BFS, DFS, Dijkstra, A* and greedy search on a grid with walls, weights and mazes.SVG to JSXTurn SVG code into a clean React component: camelCase attributes, style objects, TypeScript.Tailwind CSS Cheat SheetSearchable Tailwind class to CSS reference with live previews, class decoder and color palette.
See all 52 Web, HTML & CSS Tools →