-4

I might be asking a dumb question, but I am a newbie in javascript and its libs.

I came across the same problem as this post, and in the accepted answer, there was this line

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

However, after adding this line I have a navbar icon even though I did not include a img in my html. I also cannot manipulate the position of this icon built with this stylesheet. Can anyone explain what it does in this context? (referring to the post) I noticed that without this line of code the CSS and Javascript cannot be applied to a simple <img class="search" src="icon.png" width="30" height="30">

And how is it possible for me adjust the location of the icon with this line of code?

Claudio Cortese
  • 1,372
  • 2
  • 10
  • 21
user7544590
  • 59
  • 1
  • 2
  • 10

1 Answers1

1

font awesome is a css sheet, that when you use "font awesome classes" on a particular element, makes an icon appear. there's no jpgs or anything to mess with.

<i class="fa fa-address-book" aria-hidden="true"></i>

in a plain html, this will do nothing. but if you add the stylesheet to the page, you will see an address book icon.

all icons are located here: http://fontawesome.io/icons/

Darren
  • 46
  • 4