Red Ogden wrote:
"Sascha Kerschhofer" <sk**********@yahoo.de> wrote in message news:<bd**********@news.mch.sbs.de>...
Hi,
I am embeding my SVG Files in HTML in this way:
<OBJECT DATA="foo.svg" WIDTH="300" HEIGHT="200" TYPE="image/svg+xml"> (using
Acrobat SVG Viewer)
Since I create the SVG dynamicaly the WIDTH and HEIGHT is unknown, when
loading the HTML page. Can I embed SVG like I can do it with images without
defining WIDTH and HEIGHT. Simply "oversize" both attributes unnecessarily
produces scrollbars in the browser window.
Sascha Kerschhofer
One solution would be to dynamically generate the html file and hence
the height width attributes, using your SVG stylesheet.
There's another simple way to do it, which is to specify it like this:
<object data="foo.svg" width="100%" height="100%" type="image/svg+xml">
That way, no scroll bars will be shown and you'll get the SVG sized to
to the currently available area.
Ed