Menu icon Foundation
SVG as background-image does not work

A really weird thing:

background-image: url(../img/logo_540.png);
- this one works perfectly

background-image: url(../img/background.svg);
- this one does not give browser 404 error (filename correct) nor does it show up in a layout.

how is that possible?

svgbackground-image

A really weird thing:

background-image: url(../img/logo_540.png);
- this one works perfectly

background-image: url(../img/background.svg);
- this one does not give browser 404 error (filename correct) nor does it show up in a layout.

how is that possible?

This post has been closed. No new replies can be added.

Sven over 4 years ago

Yeah, thanks, I don’t understand, but it worked :/

Bob Sawyer over 4 years ago

Hmm. Just for grins, try background:url(../background.svg); Shouldn't make a difference, but I've always had better luck with background than background-image ...

Sven over 4 years ago

Yeah, I target IE 10 and up.

Bob Sawyer over 4 years ago

Are you sure your browser supports SVG background images?

http://caniuse.com/#feat=svg-css