On html:
<ul class="rating">
<span class="strong"><strong><li class="one"><a href="#">1 Star</a></li></strong></span>
<span class="strong"><strong><li class="two"><a href="#">2 Stars</a></li></strong></span>
<span class="strong"><strong><li class="three"><a href="#">3 Stars</a></li></strong></span>
<span class="strong"><strong><li class="four"><a href="#">4 Stars</a></li></strong></span>
<span class="strong"><strong><li class="five"><a href="#">5 Stars</a></li></strong></span>
</ul>
On CSS:
.rating {
margin: 0;
padding: 0;
list-style: none;
clear: both;
width: 75px;
height: 15px;
background-image: url(stars.gif);
background-repeat: no-repeat;
position: relative;
}
.rating li {
text-indent: −9999em;
float: left; /* for IE6 */
}
.rating li a {
position: absolute;
top: 0;
left: 0;
z-index: 20;
height: 15px;
width: 15px;
display: block;
}
.rating .one a {
left: 0;
}
.rating .two a {
left: 15px;
}
.rating .three a {
left: 30px;
}
.rating .four a {
left: 45px;
}
.rating .five a {
left: 60px;
}
Maybe this link could be helpful:
How to create a star ranking system using css