• Implementing step progress bar

    944 Views Asked by At

    I have the following code in my html page to implement a simple step progress bar

    <ol class="progtrckr" data-progtrckr-steps="5" id="stepBar">
        <li class="progtrckr-done"><a href="documents?form" style="color: black;">Order Processing</a></li>
        <li class="progtrckr-done">Pre-Production</li>
        <li class="progtrckr-done">In Production</li>
        <li class="progtrckr-done">Shipped</li>
        <li class="progtrckr-todo">Delivered</li>
    </ol>
    

    With the following CSS

    ol.progtrckr {
            margin: 0;
            padding: 0;
            list-style-type: none;
        }
    
    ol.progtrckr li {
        display: inline-block;
        text-align: center;
        line-height: 3em;
    }
    
    ol.progtrckr[data-progtrckr-steps="2"] li { width: 49%; }
    ol.progtrckr[data-progtrckr-steps="3"] li { width: 33%; }
    ol.progtrckr[data-progtrckr-steps="4"] li { width: 24%; }
    ol.progtrckr[data-progtrckr-steps="5"] li { width: 19%; }
    ol.progtrckr[data-progtrckr-steps="6"] li { width: 16%; }
    ol.progtrckr[data-progtrckr-steps="7"] li { width: 14%; }
    ol.progtrckr[data-progtrckr-steps="8"] li { width: 12%; }
    ol.progtrckr[data-progtrckr-steps="9"] li { width: 11%; }
    
    ol.progtrckr li.progtrckr-done {
        color: black;
        border-bottom: 4px solid yellowgreen;
    }
    ol.progtrckr li.progtrckr-todo {
        color: silver; 
        border-bottom: 4px solid silver;
    }
    
    ol.progtrckr li:after {
        content: "\00a0\00a0";
    }
    ol.progtrckr li:before {
        position: relative;
        bottom: -2.5em;
        float: left;
        left: 50%;
        line-height: 1em;
    }
    ol.progtrckr li.progtrckr-done:before {
        content: "\2713";
        color: white;
        background-color: yellowgreen;
        height: 1.2em;
        width: 1.2em;
        line-height: 1.2em;
        border: none;
        border-radius: 1.2em;
    }
    ol.progtrckr li.progtrckr-todo:before {
        content: "\039F";
        color: silver;
        background-color: white;
        font-size: 1.5em;
        bottom: -1.6em;
    }
    #stepBar {
        margin-bottom: 50px;
        text-align: center;
    }
    

    How can I move the step bar only if the user has some other values saved in the database, known that I'm using gvNix

    1

    There are 1 best solutions below

    0
    WordPress Speed On

    I think this should help:

    You have control over you step bar using progtrckr-done and progtrckr-todo classes for the li element. So in your server side scripting language, whatever it is ( maybe php ), try to add the appropriate class to lis to control how they show for each user, regarding values set in you database