Here’s my code for adding a Facebook button to my profile page:
In the HTML -
<button type="social" <i class="fa fa-facebook-official"></i></button>
In the CSS -
I’ve looked online and have found a few different methods. Nothing has worked for me. What am I not understanding?
go directly to the font awesome website, click on icons and do a search for facebook… they have 3 different styles. when you click on it…it tells you exactly what you need to put to apply the icon class you need. http://fontawesome.io/icon/facebook/
I’ll try it again. Still not working, although now it’s blue again. I’m going to try playing with the class settings.
Hi! Why is <link rel=“stylesheet"
awesome.min.css"/> in your css? Can you show your code?
Stefani has a good point, it should be on top of your HTML, not in CSS.
Also, always use latest versions. FontAwesome is currently 4.7.0.
1.) put the link bellow in the head of your html document
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
2.) This is just one option, but it works for me! Just copy/paste it to where you need it and change the link with the link to your page.
<a href="yourfacebooklinkgoeshere" class="btn btn-primary"><i class="fa fa-facebook"></i></a>
I understand now to put it in my HTML. Somehow I got the impression that stuff went into CSS.
Thank you so much for your help. I have success!!
Learning here every day. I’m taking good notes, too.
Thank you so much for your help. It’s working now
It’s working!! Thank you so much
I’ve put it all in my notes, as well, so I can learn from this.
I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.
Thank you!! I appreciate the advice
No problem, nice to see a fellow lady programmer here
Yes!! My father and step-mother were both programmers. She is really excited that I’m getting back into it after all these years.
Hi, this solution works for me where I was using React 16 and bootstrap 4 version and I was facing blank icon details when program runs. My problem has been solved after define above link inside index.html.
Thanks a lot for this post.