1

this my code.how to show text message inside the square box with size 1x.

<span class="fa-stack fa-5x" style="margin-left:5%">
 <i class="fa fa-square-o fa-stack-2x"></i>   
</span>

this is my fontawesome square box

nmkkannan
  • 1,261
  • 4
  • 27
  • 49

2 Answers2

1

put position absolute and put margin as per your requirement on the div tag you create in which you put the text.

<div style="position: absolute;">asdasdaddas</div>
Ron
  • 394
  • 1
  • 12
  • 24
1

Let the Font Awesome classes do the work. Wrap your text in the fa-stack-1x class and it will position and center it over the icon. You can play with the font size from there if needed.

<span class="fa-stack fa-5x fa-lg">
  <i class="fa fa-square-o fa-stack-2x"></i>
  <span class="fa fa-stack-1x">Aa</span>
</span>

http://jsbin.com/pisadulufo/1/edit?html,css,output

Cory
  • 46
  • 5