I have the following code:
.stat {
color: #4c4c4c !important;
float: left !important;
font-size: 10px !important;
line-height: 17px !important;
text-align: center !important;
text-decoration: none !important;
width: auto !important;
}
.stat:hover {
color: #747474 !important
}
.stat strong {
display: block !important;
font-size: 22px !important;
line-height: 25px !important
}
<div>
<a href="#" class="stat">
<strong>3333</strong> vic
</a>
<a href="#" class="stat">
<strong>60</strong> 0986001661
</a>
<a href="#" class="stat">
<strong>117</strong> [email protected]
</a>
</div>
I would like to know how I can align an icon instead of the label strong
. Something like this:
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<div>
<a href="#" class="stat">
<i class="material-icons">power_settings_new</i> vicsss
</a>
<a href="#" class="stat">
<i class="material-icons">power_settings_new</i> 98988888
</a>
<a href="#" class="stat">
<i class="material-icons">power_settings_new</i> [email protected]
</a>
</div>
the wrapper must have a relative position and the children or absolute icons
It's simple, you just have to make the label
i
havedisplay:block
and the link texta
is centered. Something quite similar to what you already had (I just added something else to make it a bit more flashy):