[xep-support] Scaling SVG images to fill available space

Chris Lilley chris at w3.org
Wed May 11 04:14:29 PDT 2005


On Wednesday, May 4, 2005, 6:37:04 PM, Konrad wrote:

KR> Hi,
KR> Is there any combination of external-graphic attributes that will
KR> uniformly scale my SVG to fill the page? Failing that, can I just
KR> scale the width to be 100% of the available space (not worry about
KR> height at all)?
KR> I've tried all sorts of attributes, and I can't get this to happen.. I
KR> can't find a good explanation of these attributes anywhere either.

Make sure your SVG file has a viewBox, and that
preserveAspectRatio="none".

http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute


-- 
 Chris Lilley                    mailto:chris at w3.org
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list