I need a straightforward way to display a Font Awesome icon in place of an unavailable image. Here is the code I am currently using:
<div class="notAvailableIcon" style="background-image:NotAvailable.jpg">
</div>
Here is the CSS:
.notAvailableIcon:before {
font-family: FontAwesome;
content: "\f000";
}
While this setup works when the image is not available, the problem arises when the image is present - the icon remains visible on top of the image. Is there a CSS solution to hide the icon if a background-image is set, or perhaps a method for stacking background-images so that the icon is behind the image when it's available?