Reputation: 4780
I know the typical way to use a sprite with background-position is to reference the images in the sprite using the upper left hand corner and provide negative coordinates. I have a rounded rectangle that I am using for buttons and I want to provide the coordinate for the upper right hand corner of the rectangle and and have it repeat-x to the left of the right edge of the triangle. Any thoughts?
Upvotes: 0
Views: 982
Reputation: 31
From what I think you are asking, it sounds like you want to use this rule:
background-position: 100% 0;
or
background: url(image.png) repeat-x 100% 0;
That should push the background image over so that is matches up with the right side of whatever element it is in.
Upvotes: 1