Skip to main content
Inspiring
March 14, 2020
Question

Sizing of SVG images

  • March 14, 2020
  • 1 reply
  • 723 views

Hi,

 

I'm trying to insert a few SVG images into my dreamweaver page and no matter what the width and height values are the images always fill the entire width of the parent container. I can't get them to render at the size I've saved them at in Illustrator. I've tried adding a class to them with the max-width attribute, and that didn't work. I wrapped the images in a div container and attached a class to that, with a max-width attribute, and that didn't work either.

 

If I have a svg image that measures 400px x 100px, how can I get it to render at that same size on the page? 

 

Thanks for any help you can provide.

 

Kind regards,

 

Mark

    This topic has been closed for replies.

    1 reply

    Legend
    March 14, 2020

    How are you linking to the svg image?

    Are you using <img src="myImage.svg"> or has illustrator created a load of svg code for you to include in the page and link to?

    Inspiring
    March 14, 2020

    Hi,

    Just as you've shown, <img src="myImage.svg">.

     

    Mark