[freeCodeCamp Challenge Guide: Add Font Awesome Icons to all of our Buttons

Im not quite sure how to do this

You should add a within your delete button element.

You should add a within your info button element.

Make sure each of your i elements has a closing tag and is in your like button element.

: Here’s My Code

Like
Info
Delete
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  h2 {
    font-family: Lobster, Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }
</style>

<div class="container-fluid">
  <div class="row">
    <div class="col-xs-8">
      <h2 class="text-primary text-center">CatPhotoApp</h2>
    </div>
    <div class="col-xs-4">
      <a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>
    </div>
  </div>
  <img src="https://bit.ly/fcc-running-cats" class="img-responsive" alt="Three kittens running towards the camera. ">
  <div class="row">
    <div class="col-xs-4">
      <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-info">Info</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-danger">Delete</button>
    </div>
  </div>
  <p>Things cats <span class="text-danger">love:</span></p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor"> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
    <label><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Crazy</label>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>

can you send me the code
?

button class=“btn btn-block btn-primary”> Like</button

Like This it goes on!! Don’t forget to close the button Tags :+1:

OK can someone tell me : I have the code and all correct, BUT the actual word “Delete” is somehow oddly cutt-off towards the end (the last “e” is place outside of the block).
Obviously that’s not correct, is it ? Is everyone getting the same as I see ?

2 Likes

We all got correct answer!! If you paste your code here means I can see what the problem is!!

I don’t understand what’ wrong with my code…

<div class="row">
    <div class="col-xs-4">
      <button class="btn btn-block btn-primary">Like<i class="fa fa-thumbs-up"></i></button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-info">Info<i class="info-circle"></i></button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-danger">Delete<i class="trash"></i></button>
    </div>
  </div>

Thanks randell ! the answer was right in front of me all along, you’re message help realize it.

I was having difficulties with this at first but was able to work out that you need to add the “fa fa-” element into each button’s <i class=> statements… here’s my code that worked:
<button class=“btn btn-block btn-primary”>
<i class=“fa fa-thumbs-up”>
</i>
Like</button>
</div>
<div class=“col-xs-4”>
<button class=“btn btn-block btn-info”><i class=“fa fa-info-circle”>
</i>Info</button>
</div>
<div class=“col-xs-4”>
<button class=“btn btn-block btn-danger”>
<i class=“fa fa-trash”>
</i>Delete></button>
</div>
</div>

Your classes need to include “fa fa-{insert icon}”.

For ex. your first class for the like button includes “fa fa-thumbs-up”, however your ‘info’ and ‘delete’ buttons only have “info-circle” and “trash”.

Hope this helps!