I have tried this but it didn't work:
.stackoverflow::before {
font-family: 'FontAwesome';
content: "\f16c ";
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<a class="stack-link stackoverflow" href="http://stackoverflow.com">StackOverflow</a>
Can we add whitespace(s) with ::before
selector and content
property like that?
Yes, You can add whitespace like this content: "\f16c \00a0";
Jsfiddle
\00a0
is hex code for a non-breaking space,used in content
property. More Info
Hope it helps :)
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