For example on a page with three nested divs that contain a menu and have a left, center (repeated), and right image providing a nice rounded menu. I would like to make the left and right image apart of my sprite (because they are non-repeating), but instead of the right image displaying on the right side of the page it appears exactly beside the left image. The menu looks fine with regular images, the only problem is when trying to switch to sprites.
<div id="left"> <div id="center"> <div id="right"> Menu item 1, menu item 2, menu item3, etc... </div> </div> </div>
I don't know why this code produces different results, can someone explain it to me and offer a fix?
Ps. i'm having this problem with a lot of other images but i only posted a small snippet to introduce the issue.
Left (works):
/*#left {background: url(../images/topbar-l.png) 0 0 no-repeat;} ORIGINAL*/
#left { background: url(../images/sprite.png) 0 0 no-repeat; background-position: -580px -1405px;}
Right (doesn't work, appears on the left side of the screen):
/*#right {background: url(../images/topbar-r.png) 100% 0 no-repeat;} ORIGINAL*/
#right { background: url(../images/sprite.png) 100% 0 no-repeat; background-position: -580px -1482px; }


Sign In
Create Account

Back to top









