Hi David,


On 10-08-12 05:39 PM, David Bellot wrote:
>
> From look at your application, it's not clear to me why you need to
> > define all positions in terms of a percentage.
> >
>
> Because I want to be able to change the size of my cards without 
> loosing the
> relative positions of the elements.
> Several size of cards exist (bridge, poker, etc...) and I don't want to
> duplicate the effort.
> But if I can't put the dimension at only one place in the svg file, then I
> will anyway need to make as many svg file as cards' dimensions.
> That's why I wanted to put the dimensions in a CSS.
>
> Any other solution is welcome.
>
The viewbox attribute on the SVG element allows you to define the 
dimensions of a coordinate system. You can then use absolute coordinates 
to position the elements, and they will scale with width and height of 
the svg element. Here's a simple example of this, which uses width and 
height equal to "100%" on the svg element, so you can easily see the 
scaling when you resize the browser window: 
http://stuff.echo-flow.com/circle2.svg

There's much more that viewBox can do, and you should see the 
specification for all the details:
http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute

Jake



[Non-text portions of this message have been removed]



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

-----
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-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:
    svg-developers-dig...@yahoogroups.com 
    svg-developers-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    svg-developers-unsubscr...@yahoogroups.com

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

Reply via email to