icons via cdn are not displayed on the site
I have a Card and a link where I wanted to load an icon of download, I use the class provided by Font awesome, but the icon does not appear. I have read about specificity right here in SO-pt, I also saw that the style inline has a higher priority than the other selectors. Based on this I would then if possible know which font given ICON uses so I can use the style inline and assign this same font or another way to get around this without me having to change my font-family
from body
, because I read that the icon needs a certain type of Font (I don't know which one) and that very likely the one assigned to body
could have a higher priority?
Follow the Code:
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4">
<div class="card mb-5 mx-auto" style="width: 18rem;">
<img src="img/festcasa/people-01.jpg" class="card-img-top" alt="...">
<div class="card-body text-center">
<h5 class="card-title"><strong style="color: #08979b; font-weight: bold">Lorem Ipsum</strong><br/></h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="img/festcasa/people-01.jpg" class="btn btn-primary" download><i class="fas fa-download"></i>Currículo</a>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
1 answers
Man I know problem is that vc is using the Icon class of versão 5
from FontAwesome, but is importing in your head the versão 4
from FontAwesome... Just change the version link to the one you want...
version Link 4: https://fontawesome.com/v4.7.0/icon/download
version Linde 5: https://fontawesome.com/icons/download?style=solid
Look at me not I messed with nothing of the code, just commented the link that indexes version 4 and put the version 5 and its icon appeared...
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> -->
<link rel="stylesheet" type="text/css" media="screen" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" />
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4">
<div class="card mb-5 mx-auto" style="width: 18rem;">
<img src="img/festcasa/people-01.jpg" class="card-img-top" alt="...">
<div class="card-body text-center">
<h5 class="card-title"><strong style="color: #08979b; font-weight: bold">Lorem Ipsum</strong><br /></h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="img/festcasa/people-01.jpg" class="btn btn-primary" download><i class="fas fa-download"></i>Currículo</a>
</div>
</div>
</div>
</div>
</div>