Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
fractional star rating on css
<div class="star-ratings-sprite">
<span style="width:90%" class="star-ratings-sprite-rating"></span>
.star-ratings-sprite {
background: url("") repeat-x;
font-size: 0;
height: 21px;
line-height: 0;
overflow: hidden;
text-indent: -999em;
width: 110px;
margin: 0 auto;
.star-ratings-sprite-rating {
background: url("") repeat-x;
background-position: 0 100%;
float: left;
height: 21px;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment