Skip to content

Instantly share code, notes, and snippets.

@code-boxx
Last active September 18, 2023 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save code-boxx/a1e29af71d968319258dff9540200d15 to your computer and use it in GitHub Desktop.
Save code-boxx/a1e29af71d968319258dff9540200d15 to your computer and use it in GitHub Desktop.
Simple HTML Breadcrumb Menu

SIMPLE HTML CSS BREADCRUMB MENU

https://code-boxx.com/breadcrumb-menu-html-css/

LICENSE

Copyright by Code Boxx

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/* (A) WRAPPER */
.breadcrumb {
display: flex;
flex-wrap: wrap;
}
/* (B) ITEMS */
.breadcrumb a { text-decoration: none; }
/* (C) SEPERATOR */
.breadcrumb a::after { content: ">"; }
.breadcrumb a:last-child::after { content: ""; }
/* (D) COSMETICS - THEMES */
/* (D1) GENERAL */
.breadcrumb, .breadcrumb * {
font-family: Arial, Helvetica, sans-serif;
box-sizing: border-box;
}
.breadcrumb {
padding: 15px;
border-radius: 10px;
}
.breadcrumb a { font-weight: 700; }
.breadcrumb a::after { padding: 0 10px; }
/* (D2) RED */
.breadcrumb.red { background: #ffe4e4 }
.breadcrumb.red a { color: #c53030; }
.breadcrumb.red a::after { color: #ffa9a9; }
/* (D3) GREEN */
.breadcrumb.green { background: #bbffdd }
.breadcrumb.green a { color: #219531; }
.breadcrumb.green a::after { color: #77e594; }
/* (D4) BLUE */
.breadcrumb.blue { background: #daf1ff }
.breadcrumb.blue a { color: #5067db; }
.breadcrumb.blue a::after { color: #a6c6e9; }
/* (D4) ORANGE */
.breadcrumb.orange { background: #ffebda }
.breadcrumb.orange a { color: #e18b2f; }
.breadcrumb.orange a::after { color: #ffbe96; }
<!DOCTYPE html>
<html>
<head>
<title>Simple Breadcrumb</title>
<meta charset="utf-8">
<link rel="stylesheet" href="breadcrumb.css">
</head>
<body>
<nav id="demoA" class="breadcrumb orange">
<a href="#">One</a>
<a href="#">Two</a>
<a href="#">Three</a>
</nav>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment