johnsiwicki
2/17/2013 - 5:34 PM

Ordered Lists with a hover effect

Ordered Lists with a hover effect

<ol class="numbers-list" style="counter-reset: li;">
<li>Our technicians</li>
<li>Our technicians</li>
<li>Our technicians</li>
<li>Our technicians</li>
<li>Our technicians</li>
<li>Our technicians</li>
<li>Our technicians</li>
<li>Our technicians</li>
<li>Our technicians</li>
</ol>
.numbers-list ol {
    counter-reset: li; /* Initiate a counter */
    list-style: none; /* Remove default numbering */
    *list-style: decimal; /* Keep using default numbering for IE6/7 */
    font: 15px 'trebuchet MS', 'lucida sans';
    padding: 0;
    margin-bottom: 4em;
    text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.numbers-list ol ol {
    margin: 0 0 0 2em; /* Add some left margin for inner lists */
}
.numbers-list li {
    position: relative;
    display: block;
    padding: .4em .4em .4em .8em;
    *padding: .4em;
    margin: .5em 0 20px 2.5em !important;
    color: #000;
    text-decoration: none;
    transition: all .3s ease-out;
}
.numbers-list li:hover { background: #eee }
.numbers-list li:before {
    content: counter(li);
    counter-increment: li;
    position: absolute;
    left: -2.5em;
    top: 50%;
    margin-top: -1em;
    background: #4AB1EF;
    height: 2em;
    width: 2em;
    line-height: 2em;
    text-align: center;
    font-weight: bold;
}
.numbers-list li:after {
    position: absolute;
    content: '';
    border: .5em solid transparent;
    left: -1em;
    top: 50%;
    margin-top: -.5em;
    transition: all .3s ease-out;
}
.numbers-list li:hover:after {
    left: -.5em;
    border-left-color: #4AB1EF;
}