2

I followed this tutorial: https://www.youtube.com/watch?v=Fc48IYYaEHw&index=4&list=PL0qaQSYB_0TD-7tNkfMnJ0DCFJVjBNF8G EXCEPT that I added the icons to my header instead and deleted my footer.

They were showing up fine. Then for some reason they disappeared. They show up when I preview my code in Atom, but not when I commit and view on my site.

This image shows how it shows in preview

Here is my Navbar code:

<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="index.html">Alexandra Bowen</a>
    </div>
    <div class="navbar-collapse collapse">
      <div class="navbar-text pull-left">
              <a href="https://twitter.com/AlexandraABowen"><i class="fa fa-twitter fa-1x"></i></a>
              <a href="https://www.linkedin.com/in/alexandrabrower"><i class="fa fa-linkedin fa-1x"></i></a>
      </div>
      <ul class="nav navbar-nav navbar-right">
        <li class="active"><a href="index.html">Home</a></li>
        <li><a href="about.html">About</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Experience <b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li class="dropdown-header">Admin & Dashboard</li>
            <li><a href="experience.html">Experience</a></li>
            <li><a href="talkswriting.html">Talks and Writing</a></li>
            <li class="divider"></li>
          </ul>
        </li>
        <li><a href="#contact" data-toggle="modal">Contact</a></li>
      </ul>
    </div><!--/.nav-collapse -->
  </div>
</div>

This is my CSS:

fontawesome.navbar-text > a {
color: #18BC9C;
text-decoration: none;
}
body {
padding-top: 70px;
padding-bottom: 100px;

}

My bootstrap code:

<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Rasa'      rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Bree+Serif" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
shilovk
  • 11,718
  • 17
  • 75
  • 74

1 Answers1

2

Try pulling FA from a different CDN with https:

In your <!-- Bootstrap --> section instead of
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">

Try using
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">

Mike
  • 1,675
  • 1
  • 18
  • 26
  • Thank you for your response! I edited that code, the only thing is: there is a gap under the header now between that and the jumbotron and a little bit of code on the left side that is cut off: "rel="stylesheet">" – Alexandra Bowen Aug 09 '16 at 23:59
  • From looking at [your github page](https://aabowen.github.io) there seems to be a extra `>` on line 15. You should make sure that the line is `` – Mike Aug 10 '16 at 00:13
  • Just committed updates. This is now my full code: – Alexandra Bowen Aug 10 '16 at 00:14
  • The icons seem to be working now, except for my index.html page. – Alexandra Bowen Aug 10 '16 at 00:26
  • If you look in the developer console (usually F12 on most browsers) you can see that it is having difficulty loading FA because the CDN link is not loading because of a special escape character in the url that is common when copy-pasting code. To fix this you can just edit line 15 of index.html and just backspace the `font-awesome.min.css` part and manually retype it. – Mike Aug 10 '16 at 00:27
  • To be more clear - editing line 15 to remove the 'hidden' symbol at the end of the `href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css​"` will fix this issue – Mike Aug 10 '16 at 00:41
  • I retyped it entirely and it seems to be working. I was not aware that that could happen from copy and pasting! Thank you SO much for your help. How did you know to pull FA from a different CDN and where did you find the new CDN? – Alexandra Bowen Aug 10 '16 at 00:49
  • I made a interesting discovery - if you turn off AdBlock everything appears fine in the browser. This is probably due to the fact that it is coming from a CDN in the first place rather than you serving it directly from within your github site. You can download the fontawesome css file from http://fontawesome.io and then upload it into your github project. Then you can link to that .css file rather than pointing to the CDN. – Mike Aug 10 '16 at 00:59