Is there a way to position a background image relative to the centre of an element?

aVotVegeks68

New Member
I have an element that I wish to apply a background to, though I want the background image to be positioned based on its right co-ordinate.I could use a container div to represent the background though it's not really practical in this situation.I presently have the following rule:\[code\].myelem { background-image: url("myelem.png"); background-position: 5% 60%; background-repeat: no-repeat;}\[/code\]Which for the most part works because of the size of the image. If it were possible I'd like to have something that specified that the relative position of the background was \[code\]middle\[/code\] instead of \[code\]left\[/code\].
 
Back
Top