Skip to content

Instantly share code, notes, and snippets.

@jgmuchiri
Last active April 13, 2018 00:45
Show Gist options
  • Save jgmuchiri/2df1bba11c1e1db155644cd80b0246ad to your computer and use it in GitHub Desktop.
Save jgmuchiri/2df1bba11c1e1db155644cd80b0246ad to your computer and use it in GitHub Desktop.
Simple steps navigation https://snag.gy/GoFZxw.jpg
<style>
@media only screen and (min-width: 768px) {
.cd-multi-steps {
background-color: transparent;
padding: 0;
text-align: center;
}
.cd-multi-steps li {
float: none;
margin: 0.4em 40px 0.4em 0;
position: relative;
}
.cd-multi-steps li:last-of-type {
margin-right: 0;
}
.cd-multi-steps li::after {
background: #edeff0 none repeat scroll 0 0;
content: "";
height: 4px;
margin: 0;
position: absolute;
}
.cd-multi-steps li.visited::after {
background-color: #2ecc71;
}
.cd-multi-steps li > *, .cd-multi-steps li.current > * {
color: #0e2126;
position: relative;
}
.cd-multi-steps.custom-separator li::after {
background: #edeff0 none repeat scroll 0 0;
height: 4px;
}
.cd-multi-steps.text-center li::after {
left: 100%;
top: 50%;
transform: translateY(-50%) translateX(-1px);
width: 100%;
}
.cd-multi-steps.text-center li > * {
background-color: #edeff0;
border-radius: 0.25em;
padding: 0.6em 1em;
z-index: 1;
}
.no-touch .cd-multi-steps.text-center a:hover {
background-color: #2c3f4c;
}
.cd-multi-steps.text-center li.current > *, .cd-multi-steps.text-center li.visited > * {
background-color: #96c03d;
color: #ffffff;
}
.cd-multi-steps.text-center.custom-icons li.visited a::before {
background-position: 0 -60px;
}
.cd-multi-steps.text-top li, .cd-multi-steps.text-bottom li {
text-align: center;
width: 60px;
}
.cd-multi-steps.text-top li::after, .cd-multi-steps.text-bottom li::after {
left: 50%;
position: absolute;
width: calc(100% + 40px);
}
.cd-multi-steps.text-top li > *::before, .cd-multi-steps.text-bottom li > *::before {
background-color: #edeff0;
border-radius: 50%;
content: "";
height: 12px;
left: 50%;
position: absolute;
right: auto;
transform: translateX(-50%);
width: 12px;
z-index: 1;
}
.cd-multi-steps.text-top li.visited > *::before, .cd-multi-steps.text-bottom li.visited > *::before{
background-color: #06191e;
color:#fff !important;
}
.cd-multi-steps.text-top li.current > *::before, .cd-multi-steps.text-bottom li.current > *::before {
background-color: #2ecc71;
}
.no-touch .cd-multi-steps.text-top a:hover, .no-touch .cd-multi-steps.text-bottom a:hover {
color: #96c03d;
}
.no-touch .cd-multi-steps.text-top a:hover::before, .no-touch .cd-multi-steps.text-bottom a:hover::before {
box-shadow: 0 0 0 3px rgba(150, 192, 61, 0.3);
}
.cd-multi-steps.text-top li::after {
bottom: 4px;
}
.cd-multi-steps.text-top li > * {
padding-bottom: 20px;
}
.cd-multi-steps.text-top li > *::before {
bottom: 0;
}
.cd-multi-steps.text-bottom li::after {
top: 3px;
}
.cd-multi-steps.text-bottom li > * {
padding-top: 20px;
}
.cd-multi-steps.text-bottom li > *::before {
top: 0;
}
}
.cd-multi-steps.count li {
counter-increment: steps;
}
.cd-multi-steps.count li > *::before {
content: counter(steps, decimal) " - ";
}
@media only screen and (min-width: 768px) {
.cd-multi-steps.text-top.count li > *::before, .cd-multi-steps.text-bottom.count li > *::before {
color: #0e2126;
content: counter(steps, decimal);
font-size: 13px;
height: 30px;
line-height: 30px;
width: 30px;
font-weight:bold;
}
.cd-multi-steps.text-top.count li.current > *::before, .cd-multi-steps.text-bottom.count li.current > *::before {
color: #ffffff;
}
.cd-multi-steps.text-top.count li:not(.current) em::before, .cd-multi-steps.text-bottom.count li:not(.current) em::before {
color: #2c3f4c;
}
.cd-multi-steps.text-top.count li::after {
bottom: 18px;
}
.cd-multi-steps.text-top.count li > * {
padding-bottom: 34px;
}
.cd-multi-steps.text-bottom.count li::after {
top: 14px;
}
.cd-multi-steps.text-bottom.count li > * {
padding-top: 45px;
}
}
</style>
<nav>
<ol class="cd-multi-steps hidden-xs text-bottom count mb0">
<li class="current"><a href="#">Account</a></li>
<li class="disabled"><span>Email</span></li>
<li class=" disabled "><span>Phone</span></li>
<li class=" disabled "><span>Photo</span></li>
</ol>
</nav>
@jgmuchiri
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment