Link to home
Start Free TrialLog in
Avatar of Robert Long
Robert Long

asked on

Add icon next to link with CSS

I'm trying to remember how to add an icon next to a link, for example, I want to add a cart icon next to the text "View My Cart".   This is in the header of a magento website and uses PHP.  I was hoping this can be done with css.  Thanks
Avatar of Leonidas Dosas
Leonidas Dosas
Flag of Greece image

<!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>
<a href="http://www.google.com"><i class="fa fa-cloud"></i> Test Text</a>


</body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Robert Long
Robert Long

ASKER

Thank you for your help!  And sorry for the late reply.