Click here to Skip to main content
15,749,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I downloaded this free icon from and it's static, it doesn't want to move, how can I fix this?
<script src="" crossorigin="anonymous"></script>
  class="fa-solid fa-cart-shopping">

What I have tried:

i {
  text-align: center;
Updated 2-Jul-22 11:32am
Maciej Los 2-Jul-22 15:10pm    
You html code is NOT well formed.
Duran Duran Duran 2-Jul-22 15:17pm    
why do you say so?
Maciej Los 2-Jul-22 15:25pm    
This piece of code is out of context:
class="fa-solid fa-cart-shopping">
Dave Kreskowiak 2-Jul-22 16:07pm    
A class attribute must be part of an HTML element, which you did not specify. This is illegal:
    class="fa-solid fa-cart-shopping">

The start of the element is missing, and I'll assume you want this on an image tag:
    <img class="fa-solid fa-cart-shopping">

1 solution

Why is this icon not moving?
i {
text-align: center;
Maybe icons don't obey text commands...

Have a look here: CSS: centering things[^]

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900