Why You Should Be Using CSS Sprites
Trend: Using Sprites to Optimize CSS Code
When I was in my 6th grade computer literacy class (yes, computers existed back then) I first heard the word “sprite” (no… not the drink or the preternatural legendary fairy creature) while learning this ancient educational program called Logo. Logo basically revolved around giving a turtle (not a real one) some neato commands to draw an image on the computer screen, REPEAT 4 [FD 100 LEFT 90] – I just blew your mind right there by drawing a square. You weren’t ready for that. Boom!
Thanks. That’s the end of my post. Goodnight folks! No really, what I wanted to write about is the development trend of using CSS sprites, which sounds pretty fancy but in reality is just a way of writing optimized CSS that utilizes one central image composed of numerous other images positioned differently across multiple CSS declarations. Translation: Loading an image once, then moving the image around to only show the specific portion you want to see instead of using a bunch of separately sliced up images in your CSS.
Why should you care? Mainly because using CSS sprites:
- - Requires less CSS code, which means smaller file size
- - Requires less HTTP server requests loading different images, which means quicker load time
- - No wacky JavaScript preloaders to ensure all images load
- - No annoying white flickering due to load time when hovering over button
And drum roll please… all of the above adds up a better overall user experience for your website visitors and a shiny gold star for you for being the best you can possibly be with your awesome CSS skills.
Learn More Here:
- CSS Sprites: Image Slicing’s Kiss of Death
- CSS Sprites: What They Are, Why They’re Cool, and How To Use Them
- CSS Sprites in Under 10 Minutes
In a blind taste test 9 out of 10 sprites chose Sprite!


Tweets that mention Why You Should Be Using CSS Sprites | User Interface Trends -- Topsy.com
Oct 13, 2009
7:16 am
[...] This post was mentioned on Twitter by Alltop and Cristian Forin. Cristian Forin said: Why You Should Be Using CSS Sprites http://bit.ly/G9L2b [...]
Russell Wilson
Oct 13, 2009
7:54 am
Jeff – let’s not forget that we are using sprites for our navigation at the top of uitrends! (it’s very efficient and we ran into issues with divs/text for the nav and getting alignment dead-on across browsers)…