How to stack two font icons?

299 views
Skip to first unread message

bartons...@gmail.com

unread,
Jul 7, 2015, 3:29:36 AM7/7/15
to font...@googlegroups.com
Hi,

I am new to fontello. I am coming from Font-awesome background. I really like fontello. Great project by folks at fontello. 

Is there a way to stack two font icons? For example in font awesome, we use something like this:

<span class="fa-stack fa-1x">
     <i class="fa fa-circle fa-stack-2x"></i>
      <small class="fa-stack-1x">3</small>
</span>

How do we do similar thing with fontello?

Thank you!

Novina W

unread,
Jul 16, 2015, 3:24:48 PM7/16/15
to font...@googlegroups.com
Hi there.  You can write your own classes like font awesome to make this work.  The key to making this work is that in font awesome, the fa-stack class has a position relative, and the other two has position absolute.

So using the above html, just add this to the css.

.fa-stack { position: relative; }
.fa-stack-1x, .fa-stack-2x {position: absolute; top: 0; left: 0; }

And if they don't layer properly, then write individual classes for .fa-stack-1x and 2x and move the position inside it.  
Reply all
Reply to author
Forward
0 new messages