homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

CSS Sprites
CSS Sprites

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

I want to use CSS Sprites for my web site.

Can someone tell me its pros and cons?



 3:16 pm on Sep 17, 2009 (gmt 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 Sep 17, 2009 (gmt 0)

really smooooooooth rollovers. :)


 9:45 pm on Sep 18, 2009 (gmt 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved