0

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?

Adam
  • 4,590
  • 10
  • 51
  • 84

1 Answers1

1

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.

The Dude
  • 31
  • 1