Copy link to clipboard
Copied
After exporting SVG Files suddenly, extra white space appears out of nowhere. I have FIT the artboard to the Artwork Bounds, and Used Artboards when exporting but nothing seemed to work. Tried a lot of different options found here and in different forums, but it just refuses to work.
1. Before exporting in Illustrator file perfectly fitted to the artboard
2. Exported file:
Copy link to clipboard
Copied
Which version?
Which system?
How exactly do you export the SVG?
Is there a clipping mask somewhere in the artwork?
Which viewer are you using to check the file?
Copy link to clipboard
Copied
Illustrator CC 2018 22.0.1 ( also tried older version of Illustrator CC 2013 the same problem) I am previewing with an image preview on Mac and in the browser.
System MACos Sierra
There is no clipping mask.
I've tried all exporting options, and every time there is an extra white space, but just in a different place, sometimes below, sometimes my SVG element is in the middle with space around and sometimes there is a space below and on the right. I tired SAVE AS SVG and it still happens, I've tired EXPORT AS..., and I have tried all options there and also different combinations, I have also tried EXPORT FOR SCREENS.
When I save the same file as AI or EPS, it saves exactly as it should, without any extra white space. This only happens for SVG elements.
When I check SVG code it shows me:
width="width of the element" height="height of the element viewBox="0 0 width height"
which looks exactly as it should.
I tried different files, and the same issue. I checked if there is something, maybe extra hidden layer or object, there is nothing.
I have send this centred version of the SVG to the Developer and he told me it behaves in a strange way in the browser, and it just keeps being in the centre because of that extra space.
Copy link to clipboard
Copied
Jolievin schrieb
I have send this centred version of the SVG to the Developer and he told me it behaves in a strange way in the browser, and it just keeps being in the centre because of that extra space.
"It keeps being in the centre" of what?
Copy link to clipboard
Copied
https://forums.adobe.com/people/Monika+Gause wrote
Jolievin schrieb
I have send this centred version of the SVG to the Developer and he told me it behaves in a strange way in the browser, and it just keeps being in the centre because of that extra space.
"It keeps being in the centre" of what?
OF the WHITE SPACE that is being added to every SVG file I have exported. But on the website it still looks centered although it is transparent.
This is how the file looks like in the preview and in the browser:
I've added the black border so you can notice all the white space around it, that is not there when opening the SVG file in the illustrator.
This is how the file looks like in the Illustrator:
NO WHITE SPACE AROUND IT or below it
Copy link to clipboard
Copied
White space around an image on a website can appear because of CSS styling.
Without seeing the actual page and the actual SVG file this will be impossible to solve.
Copy link to clipboard
Copied
I had the same problem. My Project is a Captivate 2019 responsive project with Fluid Boxes. I encountered the problem when I:
The Solution was for me :
Hope this helps.
Ooops, I just saw this is a Illustrator related question. Not sure why I was directed here after searching for a solution for Captivate. I hope it still helps someone.
I guess the bigger takeaway is that the problem is most likely not caused during the export (Illustrator) but by whatever is the receiving container, that which renders the image and styles the svg-element
Copy link to clipboard
Copied
Hi there, I know it's an old post but I have the same problem and wondering if you solved it. Thanks
Copy link to clipboard
Copied
Nope, sure isn't. I'm having the same problem.
Copy link to clipboard
Copied
Thanks!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now