TipsBlocks Web Technique Library

PRACTICAL WEB TIP

← Back to library

Breadcrumb Step Marker

A restrained marker highlights the current position in a breadcrumb trail.

Live Demo

Hover over the element or use Tab to focus.

Source Code

Copy the HTML, CSS or JavaScript you need for your project.

HTML
<nav id="tbx-1037" class="tbx-1037" aria-label="Breadcrumb navigation">
  <ol><li><a href="#tbx-1037">Home</a></li><li><a href="#tbx-1037">Services</a></li><li><span aria-current="page">Consulting</span></li></ol>
</nav>
CSS
.tbx-1037{width:min(285px,100%);font:600 12px/1.4 system-ui,sans-serif}
.tbx-1037 ol{display:flex;align-items:center;flex-wrap:wrap;gap:4px;list-style:none;padding:0;margin:0}
.tbx-1037 li{display:flex;align-items:center;gap:6px}
.tbx-1037 li+li:before{content:"/";color:#adb5c4}
.tbx-1037 a,.tbx-1037 span{display:inline-block;position:relative;padding:9px 5px;color:#627389;text-decoration:none;transition:color .23s}
.tbx-1037 a:after{content:"";position:absolute;inset:auto 5px 4px;height:2px;background:#c27b46;transform:scaleX(0);transform-origin:left;transition:transform .25s}
.tbx-1037 a:is(:hover,:focus-visible){color:#183957}
.tbx-1037 a:is(:hover,:focus-visible):after{transform:scaleX(1)}
.tbx-1037 [aria-current=page]{color:#182e42;font-weight:800}
.tbx-1037 a:focus-visible{outline:2px solid #567f9e;outline-offset:3px;border-radius:2px}
@media(prefers-reduced-motion:reduce){.tbx-1037 a,.tbx-1037 a:after{transition:none}}

How to Use

Insert the HTML and add the CSS to your stylesheet. Adjust colors and sizes and avoid class conflicts.

Use Case

Useful for navigation menus.

Technical Notes

Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.

Mobile:Ensure the interactive content remains accessible without hover on touch devices.

Browser:Uses modern CSS. Check behavior in the browsers you support.

Reduced Motion:Check that prefers-reduced-motion is respected.