SVG with height auto not shown in firefox

1

With an image in svg format I am having problems applying this CSS:

    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    max-width: 128px;
    max-height: 128px;

The image appears in all browsers except Firefox.

The height:auto I have it so that I can go climbing in function I resize the screen but if I have it that way it is when I do not show it in FF.

How can I do it so that I can show it but I can scale it well if I resize the screen?

    
asked by Marcos 20.11.2017 в 16:17
source

1 answer

1

You can assign the height based on the screen size and put a class to your svg ... (The concept would be like bootstrap to manipulate the responsiveness of some resources it has)

@media (min-width: [tamaño_minimo_de_pantalla]px) {
  .class_de_tu_svg {
    height: ___px;
  }
}
    
answered by 20.11.2017 в 16:38