ResolvedSVG file won’t display

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24114
    salescristofoli
    Participant

    Hi,

    Trying to use an svg file for the website logo. I have uploaded SVG files into my library but images are refusing to load. I have a feeling it is because I need to set image dimensions.

    I have tried adding this to the bottom of my style.css file but nothing changes:

    img[src*=’.svg’]{
    width: 100%;
    height: auto;
    }

    Any advice?

    #24160
    Althemist
    Keymaster

    Yes, it’s exactly because of the dimensions. SVGs can’t work without them. However, relative numbers wouldn’t work. You’d need to speciafy the exact dimensions width and height in px.

    #24207
    salescristofoli
    Participant

    Thankyou for the reply.
    So how do I set the dimensions in the logo header area? I can’t find where/how to modify the CSS. How do I modify the mobile view logo also?

    #24215
    Althemist
    Keymaster

    Something like this:

    #header #logo img[src*=’.svg’]{
    width: 120px;
    height: 46px;
    }
    #header #logo img.refer_mobile_logo[src*=’.svg’] {
    width: 50px;
    height: 50px;
    }
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for any item belonging to this account
AlThemist

AlThemist

sales 17637, followers 745
Login and Registration Log in · Register