Logo (in svg) appears in Mozilla and not in Chrome

0

Asyoucanseeintheimage,thelogoisappearinginMozillaandChromeisnot.IeventriedInternetExploreranditalsoappears,whichleadsmetobelievethattheproblemhappensexclusivelyinChrome.

Doesanyonehaveanideawhatitcanbe?

Asnippetofmycode:

HTML:

<headerid="main-Header">
<div id="wrapper">
    <div class="main-Logo">
        <img src="img/logo.svg">
    </div>
    <div class="main-Title">
        <h1>Lamonier</h1>
        <p>Web Design inteligente e com alta performance,</p>
        <p>utilizando as melhores tecnologias atuais</p>
    </div>
</div>

CSS:

#main-Header{
height: 0px;
background: rgb(89,103,255);
background: -moz-linear-gradient(top, rgba(89,103,255,1) 0%, rgba(144,65,255,1) 100%);
background: -webkit-linear-gradient(top, rgba(89,103,255,1) 0%,rgba(144,65,255,1) 100%);
background: linear-gradient(to bottom, rgba(89,103,255,1) 0%,rgba(144,65,255,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5967ff', endColorstr='#9041ff',GradientType=0 );
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}

#main-Header .main-Logo{
display: flex;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
    
asked by anonymous 09.03.2018 / 02:14

1 answer

1

The problem was in the way I treated the image, that is, with the IMG tag

<img src="img/logo.svg">

Chrome apparently does not handle svg formats using the IMG tag

The solution was treat as object as follows:

<object data="img/logo.svg" type="image/svg+xml"></object>
    
10.03.2018 / 16:22