Choose a text divider or pure <hr> rule
Open CSS Section Divider & Horizontal Rule Generator and compare Fading Pill "OR" Dividers, Minimal Text Rules, Centered ✦ Ornaments, Left Section Kickers, Center-Peak Fading <hr>s, and Double or Dashed Editorial Lines.
Click Customize to edit label text, thickness, and fade colors.
Refine thickness, spacing, and surface colors
In Shape, dial in Line thickness (1px–5px), Label side spacing, and Badge corner radius.
In Fill, harmonize the hairline and badge colors with light or dark cards.
Drawing left and right flex: 1 lines beside the text works even over gradients, dot grids, or transparent glass where a solid background mask would show a box!
Removing the browser default inset border lets height: 1.5px; background: linear-gradient(...) render with sub-pixel crispness.
Copy clean flexbox or <hr> CSS
Text dividers use display: flex with ::before and ::after (flex: 1) instead of position: absolute + negative top margins, so they work on any background color!
Copy Vanilla CSS, HTML, :root variables, or Tailwind utility classes.
Ready to use CSS Section Divider & Horizontal Rule Generator?
Open CSS Section Divider & Horizontal Rule Generator in your browser—100% private on your device with zero sign-up and copy-ready CSS, HTML, :root tokens, and Tailwind code. Related CSS studios: CSS Input Generator, SVG Wave & Divider Generator, CSS Gradient Generator.
CSS Section Divider & Horizontal Rule Generator FAQs
Practical frontend details for accessible, cross-browser CSS output.
When should I use <hr> vs <div role="separator">?
Use <hr> when there is no visible text (since <hr> is a void element), and <div role="separator"> when displaying centered text or an icon badge.
How do the outer ends fade smoothly into any background?
Using linear-gradient(90deg, transparent, lineColor) on the left and linear-gradient(90deg, lineColor, transparent) on the right dissolves smoothly into any surface.
Can I left-align a section kicker with a single trailing line?
Yes—choose Left Kicker + Trailing Line to omit ::before and stretch ::after cleanly to the right edge.