duddosai duddosai - 3 months ago 24
CSS Question

Combine two Font Awesome icons

I'm trying to combine two Font Awesome icons, to create a stack. I'm trying to merge

icons. This because, I need an icon for date-time.

So, in order to combine them, I tried this:


<span class="icon-stack">
<i class="fa fa-calendar icon-stack-3x"></i>
<i class="fa fa-clock-o icon-stack-1x"></i>


.icon-stack {
position: relative;
display: inline-block;
width: 2em;
height: 5em;
line-height: 4em;
vertical-align: middle;
.icon-stack-3x {
position: absolute;
left: 0;
width: 100%;
text-align: center;
.icon-stack-1x {
line-height: inherit;
.icon-stack-2x {
font-size: 1.5em;
.icon-stack-3x {
font-size: 2em;

This is what I get as a result.

enter image description here

But, I want to bring a little bit to right. I don't know how to do that? What can I do to bring it a bit towards right?


Well, as you have done your own CSS for position you just need to set the text-align to right, like this:

.icon-stack-3x {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: right;

Here is a working example