The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS Sprites in a UL Re: CSS Sprites in a UL


I don’t think it’s the whitespace Paulie.

, I believe the sprite needs to be changed to include more space between the icons to allow for conditions like you encountered. Of course, this method won’t center the image on the li. To accomplish centering, you may need to change the sprite to be horizontal rather than vertical. In this case, you would need a large amount of space between the icons in the sprite to account for the width of the list, but it would work. Even though the sprite would extremely long, I believe its file size could still be optimized to make the the sprite a better option than individual background images.