Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change x value of SVG text from CSS

Tags:

html

css

svg

Is there anyway to change the x value of this text from my stylesheet?

< text class="jqx-chart-axis-text" x="7" y="11" width="50" height="37" cursor="default">70000

like image 462
Frank Kluytmans Avatar asked Mar 25 '13 09:03

Frank Kluytmans


2 Answers

You can use transform: translateX(5px) to change the x coordinate of text element.

like image 110
MehulG Avatar answered Sep 30 '22 07:09

MehulG


You can indirectly affect it, but x isn't a css property (yet).

You can e.g affect text-anchor with CSS. In the future it should hopefully become possible to style the transform in svg content too, but atm it's not supported by all browsers.

like image 23
Erik Dahlström Avatar answered Sep 30 '22 06:09

Erik Dahlström