skip to Main Content

An html5 template I downloaded has red icons as shown in the image here . I want to change the color of icons to #628e7f. I inserted the following codes in the main.css file . Instead of changing the icon colour, this code is changing the colour of the text in front of the icons, as shown here.

How to change the color of the icons?

I changed the css file, but it didn’t work.

2

Answers


  1. You have to edit the image files (or create new image files) with the different colors.

    The style color only changes text color.

    Login or Signup to reply.
  2. Try it with style element first.

    <i class="fa fa-envelope" style="color:#628e7f"></i>
    

    if it works, than create a new class and insert it in CSS file. If its not working in css file, just make sure you put !important in that line.

    main.css:

    .green-icon { color:#628e7f !important }
    

    in html:

    <i class="fa fa-envelope green-icon"></i>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search