Rodolfo
Rodolfo

Reputation: 31

Using Font Awesome icon inside of a Bootstrap 4 Card

I am a newbie with Bootstrap 4 and am getting stuck on something that is hopefully simple - I have searched here and read the bootstrap examples but didn't see what I need.

I am looking to put a font awesome icon inside of a card. Here is my sample code:

<div class="card">
<div class="card-block">
<i class="fa fa-check"></i>
</div>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
</div>

Upvotes: 0

Views: 5340

Answers (1)

Brian Gottier
Brian Gottier

Reputation: 4582

In your HTML head section you attempt to load the Font Awesome stylesheet:

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

This attempt does not include the rel attribute, and in my browser as soon as I set it to stylesheet the font awesome icons appear:

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

Upvotes: 3

Related Questions