Sign in
Log inSign up

How does SVG ViewBox work?

Matthew Stillwell's photo
Matthew Stillwell
·May 16, 2016

I was stuck with some annoying white space in my SVG logo and tried adjusting the ViewBox attribute value, after a bit of playing around with it, I was able to fix the white space.

I understand that ViewBox is kind of a box where the inner SVG content is placed but what is the system behind it that decides how the inner SVG content is going to look?