-1

I am experimenting with making svg files in illustrator and using them in my html website. But the problem is when i paste my svg code in my html file it has the background size of the artboard of illustrator. And when i adjust the stroke in html, the size of the svg cuts the strokes of the path.

0

As far as I know, there is no way to 'turn off' the viewBox (which I'm guessing is what you are talking about) when exporting as SVG from Illustrator.

I'm not sure you would want to, as it is the reference for positioning in you entire SVG file. Deleting it would pretty much always result in a broken image. See here for more info.

If you want SVG files that scale automatically when scaling your surrounding element (e.g. a div, a paragraph, ...), you need to use Export as... from the File menu, then choose Responsive in the options.

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.