Nescio Nescio - 6 months ago 55
CSS Question

How can I overlay a number on top of a FontAwesome glyph?

How can I overlay a number between 0 and 99 in the middle of 'icon-star-empty'?

Answer

You css should look something like:

.contain-i-e-s,.icon-empty-star,.text-i-e-s{
  height:100px; width:100px;
}
.contain-i-e-s{
  position:relative;
}
.text-i-e-s{
  text-align:center; position:absolute;
}

Your HTML might look like:

<div class='contain-i-e-s'>
  <i class='icon-empty-star'></i>
  <div class='text-i-e-s'>99</div>
</div>