Mobile app version of vmapp.org
Login or Join
Shanna688

: SVG loses "pixel" when exporting - wrong export settings? I am working closely together with a developer to create websites. We've stumbled upon a problem when it comes to exporting SVGs from

@Shanna688

Posted in: #AdobeIllustrator #CreativeCloud #Svg #WebsiteDesign

I am working closely together with a developer to create websites. We've stumbled upon a problem when it comes to exporting SVGs from Adobe Illustrator (CC) and implementing them on websites.

The artboard in illustrator looks like follows:



Yet, when added to the web code, there is a gap we cannot get rid of:



SVG export settings age:


styling: presentation attributes
font: svg
object ids: layer names
decimal: 0


Additional option: responsive

Has anybody experienced anything similar?

Thanks in advance for your help :)

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shanna688

2 Comments

Sorted by latest first Latest Oldest Best

 

@Murray664

Have you tried the asset export feature in the newest version of Illustrator? It takes out a lot of guess work for getting SVG assets out of Illustrator.
It should not accidentaly crop out part of your art as long as you select it all and drag it into the asset export like shown below. I've had good luck with it recently.

10% popularity Vote Up Vote Down


 

@Reiling762

It looks to me like the svg is a different aspect ratio from the area it is intended to fit in.

For a shape as simple as a triangle in a box, I think the best solution is for your developer to use borders on a ::before element to simulate a triangle shape. If the ::before element is positioned to the center top of the box, then the aspect ratio of the box won't matter.

If you and the developer would rather use the svg, I would recommend trimming the artboard to the size of the svg, that way you don't have to worry about aspect ratios, the developer just has to set the svg to height:100% and center it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme