On Thu, 17 Mar 2011 01:36:22 +0100, jamesd <[email protected]> wrote:

> I was sitting around putting files together to test the new web browsers  
> and got to thinking. Disclaimer: I have a severe thinking problem.  
> Anyway I thought it might be cool to use the use tag in HTML.
>
> Got it to work, sort of. Hoping someone with a better left side brain  
> can take a look at the file and explain why it does what it does, or  
> even better make it work properly.
>
> Use elements show up (Scroll down to find the others), but take an  
> entire row of the HTML page to display. Also an inordinate amount of  
> white space.
>
> So if you want a diversion, copy the source and see if you can make it  
> work. Might be useful to others as well as myself.
>
> http://jdsvg.com/use_in_html.html

Nice example. It works the same in Firefox 4 and Opera 11.50 Ragnarök [1],  
and seems to work as I would expect (that is: the <use> references are  
allowed to reach outside of the current svg fragment).

Your svg fragments don't specify any width or height, so you get the  
default 100% width and 150px height. If you want something else then tweak  
your CSS, e.g svg { width: 300px; border: 1px solid black } (note that  
since you don't use a viewBox on the fragments you may get some content  
outside the viewport which will be clipped away).

Cheers
/Erik

[1] http://labs.opera.com/news/2011/02/22/

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed


------------------------------------

-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to