Sukrams
Sukrams

Reputation: 127

IE doesn't show SVG

the IE doesn't show SVG images on my website.

The first image that isn't shown is a logo image which is put via :before content in front of a Logofont.

the css code is the following:

    .logo-svg:before {
    content: url('images/logo.svg');
}

.logo-svg {
    height: 1.6em;
    width: 1.6em;
    display: inline-block;
    margin-right: 0.2em;
    position: relative;
    top: 0.2em;
}

Then a few images, that are background images for icons are not shown too, the CSS is here:

.author-link-posts {
    background-image: url("/images/icons/svg/archive.svg") !important
}

Has somebody an idea why the IE doesn't show the SVG or maybe a workaround or something like this?

Regards, Markus

Upvotes: 0

Views: 426

Answers (2)

Sukrams
Sukrams

Reputation: 127

The solution are the paths. I had to put the slash before the path, so it works in the IE.

Upvotes: 0

Shibin Joseph
Shibin Joseph

Reputation: 99

SVG is not supported in IE8 and below. Is this issue happened in all other browsers? Also you can use modernizr as a fallback.

Basically Modernizr will add a "no-svg" class in tag.

Upvotes: 1

Related Questions