Set Font Awesome Icons color and size in CSS

ramco1917
 
on Jun 17, 2021 11:25 PM
1369 Views

Hi

I want wherever i used class class="fa fa-check" it's color should Be Red & also I want to give size

So I don't have to write in every Index

Thanks

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Jun 17, 2021 11:27 PM
on Jun 18, 2021 12:12 AM

Hi ramco1917,

Use below code.

<i class="fa fa-check" style="font-size:48px;color:red"></i>

HTML

<html>
<head>
<title></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"/>
    <style type="text/css">
        .color_red
        {
            font-size:48px;
            color:red;
        }
    </style>
</head>
<body>
    <i class="fa fa-check"></i>
    <i class="fa fa-check" style="font-size:24px"></i>
    <i class="fa fa-check" style="font-size:36px;color:green"></i>
    <i class="fa fa-check color_red"></i>
</body>
</html>

Demo