Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to style Font Awesome Directional Icons

I am trying to reduce the width of the font awesome directional arrow through external css (I need it to be done through external css).But i am not able to increase the font-size and while doing through inline css its working fine

.fa-arrow-circle-left
{

  color:red;
  font-size:48px;
}
<!DOCTYPE html>
<html>
<head>
<title>Font Awesome Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>

<h1>fa fa-arrow-circle-left</h1>


<i class="fa fa-arrow-circle-left" ></i>
<br>



<!-- <p>Unicode:</p>
<i style="font-size:24px" class="fa">&#xf0a8;</i> -->

</body>
</html>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Alrighty, so I played with this in a JSFiddle and found that you need to wrap the <i class="fa fa-arrow-circle-left"></i> in a container. For me, I used a <p> element, but I’m sure this can be done with <div>, <a>, <button>, etc.

All you need to do, after wrapping the icon in a container, is just add the styles to the container:

p {
  color: red;
  font-size: 50px;
}
<!DOCTYPE html>
<html>

<head>
  <title>Font Awesome Icons</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>

<body>

  <h1>fa fa-arrow-circle-left</h1>


  <p>
    <i class="fa fa-arrow-circle-left"></i>
  </p>
  <br>

</body>

</html>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading