Assume the following svg document:
<svg version="1.1" baseProfile="full" width="300" height="200" xmlns="http://www.w3.org/2000/svg">
<text x="20" y="20">My text</text>
</svg>
Now what i want to do is reposition this text using css.
I have tried adding style="dx:20"
and style="transform: translate(20)"
. Both have no effect in firefox and safari. Adding these as normal attributes works fine but then i can't split the positioning from the actual code.
Setting x
, y
, left
and top
in the style isn't working either.
Is there a way to position an svg element using css?