http://jsfiddle.net/cirosantilli/aZ9g4/3/
The stacked "GitHub Issue" icon is twice as large as the other fixed width non stacked ones, and makes my nav look bad.
Is there a way within the library to make it be the same size without hacking low level CSS properties?
If only there was a fa-stack-half
...
If not, what is the best workaround?
If you prefer to work with icons that have a consistent width, adding fa-fw will render each icon using the same width.
To stack multiple icons, use the fa-stack class on the parent HTML element of the 2 icons you want to stack. Then add the fa-stack-1x class for the regularly sized icon and add the fa-stack-2x class for the larger icon. fa-inverse can be added to the icon with the fa-stack-1x to help with a knock-out looking effect.
The fa-fw class is used to set icons at a fixed width. This class is useful when different icon widths throw off alignment.
Looking at the examples for stacked icons, you can do this by modifying the font-size on the span:
Just add a rule like:
.fa-sm {
font-size:0.63em;
}
With Markup:
<span class="fa-stack fa-sm">
<i class="fa fa-exclamation fa-stack-1x"></i>
<i class="fa fa-circle-o fa-stack-2x text-danger"></i>
</span>Github Issue
Fiddle: http://jsfiddle.net/epxtY/
Try adding this CSS
.fa-stack{
width: 1.28571em;
}
.fa-circle-o.fa-stack-2x {
font-size: 1.4em;
top: 2px;
}
.fa-exclamation.fa-stack-1x{
font-size: 10px;
top: -3px;
}
http://jsfiddle.net/aZ9g4/12/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With