Question

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

Was it helpful?

Solution

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>

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top