0

I have a problem with Mozilla Firefox. My website contains content:url(); tags and it's working fine on Chrome, Opera but not working on Mozilla Firefox and Explorer.

    <div class="img"></div>

    .img{
    content:url("http://animalia-life.com/data_images/wallpaper/wolf-wallpaper/wolf-wallpaper-05.jpg") no-repeat;
}

JSFiddle

The only solution is i change the content:url() to background:url()?

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Joci93
  • 803
  • 3
  • 10
  • 24
  • possible duplicate of [content url is not working in Firefox](http://stackoverflow.com/questions/12262118/content-url-is-not-working-in-firefox) – Weafs.py Jan 22 '15 at 16:39

1 Answers1

0

I know this is a pretty old question, but I'd like to answer it just in case others have this issue. You could use background:url() (which is easier) for Firefox, as Mozilla doesn't view the content CSS property the same way as Chrome and the other browsers view it. If you want to use the content code, you'd have to use the before and after attribute.

You can look at the documentation for the way Mozilla views the content property here: Mozilla CSS Content Property