Tools51

CSS & UI STUDIO GUIDE

How to style fading CSS <hr> rules and centered "OR" login dividers

Separate form sections and editorial chapters with refined hairlines and badge dividers.

Create center-peak fading gradient <hr> hairlines, login "OR CONTINUE WITH" pill dividers, sparkle ornaments, and double editorial rules in CSS.

Follow the guide
Before Inset 1990s Browser <hr>
CSS Section Divider & Horizontal Rule Generator unstyled HTML before — Inset 1990s Browser <hr>
Clunky beveled 2px gray browser <hr> rule.
After Fading Gradient & Pill Divider
CSS Section Divider & Horizontal Rule Generator styled CSS result after — Fading Gradient & Pill Divider
Tapered linear-gradient hairline or centered OR CONTINUE WITH pill separator.
QUICK VIDEO TUTORIAL How to style fading CSS <hr> rules and centered "OR" login dividers Separate form sections and editorial chapters with refined hairlines and badge dividers. Watch the video

How to style fading CSS <hr> rules and centered "OR" login dividers

01

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.

02

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.

Why Flexbox ::before/::after beats z-index masking

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!

Reset border: 0 first on custom <hr> tags

Removing the browser default inset border lets height: 1.5px; background: linear-gradient(...) render with sub-pixel crispness.

03

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.

Open CSS Section Divider & Horizontal Rule Generator
Common questions

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.

Image detail

Language38

EnglishالعربيةFrançaisItalianoDeutschEspañolPortuguêsNederlandsРусскийTürkçe日本語中文हिन्दीBahasa IndonesiaBahasa Melayu한국어Tiếng ViệtไทยPolskiSvenskaУкраїнськаNorskবাংলাΕλληνικάفارسیاردوČeštinaDanskMagyarRomânăSuomiБългарскиFilipinoქართულიSlovenčinaAzərbaycancaעבריתSlovenščina