XF 2.3 svg images not resizing

I am trying to add an image in front of a node prefix, but the SVG is really big, not resizing. Here is my code. Code works perfect with a png, just not a SVG.


Code:
    &:before {
    content: url('logos/nhl/svg/FLA_dark.svg');
    padding-right: 10px;
    vertical-align: middle;
    width: 10px !important;
    height: 20px !important;
    max-width: 10px !important;
    max-height: 20px !important;
        }
 
Last edited:
Try background-image instead:

Code:
&:before {
    content: '';
    display: inline-block;
    background-image: url('logos/nhl/svg/FLA_dark.svg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 10px;
    height: 20px;
    margin-right: 10px; 
    vertical-align: middle;
}
 
Back
Top Bottom