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

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

#1

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

#2
<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>


#3

If you look at the test results, it tells you exactly what you need to do:

You should add a within your delete button element.

You should add a within your info button element.

What do you not understand about the test results above? If you look at the code for the Like button, you will see how <i class="fa fa-thumbs-up"></i> was nested within it. You need to do something similar for the other two buttons while using the applicable icon.


#4

can you send me the code
?


#5

I have told you what to do. What are you not understanding? The instructions in the challenge and the extra instructions I have given has all the information you need to solve this challenge.


#7

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

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


#8

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 ?


#9

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


#10

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>

#11

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


#12

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>


#13

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!