Sizing SVG to fill div

  • Unknown's avatar

    Hi! I’m hoping to get some help with an issue I’ve been having with a few SVG icons. They’re correctly filling the divs in the editor, but not when I preview the website. I’m using Safe SVG as my SVG plugin. A few things I’ve done to prep the SVGs include: setting width and height to 100% in the files, and recoloring them to white. The only icon which is working as intended has a viewbox of 1024, whereas the others are only 24, so I’m guessing this has something to do with the issue? I’ve messed around with the CSS but am still having issues so any help is greatly appreciated.

    I’ve tried attaching image examples but I guess my 10kb image is too much.

    The blog I need help with is: (visible only to logged in users)

  • Hi there! 👋

    Thanks for reaching out and for sharing the details you’ve already tried.

    We’ll follow up with you directly via the email address connected to your account so we can take a closer look at your site and help troubleshoot the SVG sizing issue.

    Talk soon!

  • The topic ‘Sizing SVG to fill div’ is closed to new replies.