homepage Welcome to WebmasterWorld Guest from 107.22.78.233
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
CSS Sprites
CSS Sprites
abidshahzad4u




msg:3990943
 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?

 

Edouard_H




msg:3990983
 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.

birdbrain




msg:3991005
 3:39 pm on Sep 17, 2009 (gmt 0)

really smooooooooth rollovers. :)

ChrisBolton




msg:3991885
 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