Replace awesome font with an image CSS

[ad_1]

Try this:

.header .my-account-link .fa-user::before {
background-image: url(/path/to/your/image.png);
content: "";
}

You may need to position the background image even more precisely using other properties.

Thread Starter
marseem

(@waseemsannib)

Thank you for the support. However, it looks that the css code did not work.

what should I insert in the content?

https://ibb.co/xzpLRNt

The content property simply has to be there, even if it is empty. Alternatively, you can also store the image there:

content: url(/path/to/your/image.png);

I don’t currently see that you have inserted the code at all. Where did you store it?

Thread Starter
marseem

(@waseemsannib)

The following code didn’t display the image:

.header .my-account-link .fa:before.header .my-account-link .fa:before {background-image: url(http://www.marseem.com/wp-content/uploads/2024/06/silhouette_37947.png); content: “”;}}

Thread Starter
marseem

(@waseemsannib)

Thanks for the support. Now it worked.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer