Quantcast
Channel: Background-Image in element - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Quentin for Background-Image in element

$
0
0

You are escaping your quote marks and have transposed the second quote mark and bracket.

In CSS:

url('foo')   /* is technically fine but broken on IE/Mac */url(foo)     /* is fine */url('foo)'   /* is not fine */url(\'foo\') /* is not fine */

And as Ross points out in a comment, your src attribute is missing. I imagine that setting a background-image on an image with a translucent background will work, but if you don't have a content image, don't use an <img> element (and don't hide any content images you do have in in background-image properties).


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>