Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

CSS Sprites

CSS Sprites

2:15 pm on Sep 17, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:May 11, 2009
votes: 0

I want to use CSS Sprites for my web site.

Can someone tell me its pros and cons?

3:16 pm on Sept 17, 2009 (gmt 0)

Full Member

10+ Year Member

joined:Oct 9, 2002
votes: 0

In the 'pro' column, using sprites reduces the number of http requests to the server. If you use, say, 20 separate images for icons and backgrounds you can consolidate them into a single image therefore a single http request instead of 20.

The only 'con' that comes to mind is that it can be time consuming to create the image file. Measuring the placement of each individual element in the larger file helps greatly when writing the CSS though.

3:39 pm on Sept 17, 2009 (gmt 0)

Senior Member from GB 

joined:Oct 2, 2003
posts: 1019
votes: 39

really smooooooooth rollovers. :)
9:45 pm on Sept 18, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:June 21, 2005
votes: 0

The only con used to be the fact that when the user increased the text size in the browser, your elements grow and other background images start showing up in strange places. Now, as ALL browsers actually magnify the page when a user increases the text size, there are no cons, USE THEM and get faster page load time and less http requests.

I also find that it makes it easier to find and edit images when there are quite a few on just one file.