How do I get just the x or y position of the background image using prototype?

Posted by ro on Stack Overflow See other posts from Stack Overflow or by ro
Published on 2010-04-11T22:29:39Z Indexed on 2010/04/11 22:33 UTC
Read the original article Hit count: 279

Hey, I'm making a simple user friendly css editor using Prototype. Anyway, I was wondering whether I could get the background-position x/y values on their own?

I wish I could do something like this but sadly it doesn't work: element.getStyle('background-position-x);

I guess this is because position comes in different forms like 'center' rather than just being generic.

© Stack Overflow or respective owner

Related posts about prototype

Related posts about JavaScript