How to improve your web performance using CSS-Sprites

CSS sprites is a technique to combine unlimited number of images into one to improve the performance of your web page.Have you ever seen the CSS technique where the “on” and “off” states of a button are contained within the same image and are activated by shifting the background-position? Think of CSS Sprites as an extension of that technique.With millions of users Google,Yahoo!,MySpace,YouTube and AOL do everything they can to improve the user experience. As all of them use CSS sprites to save numerous HTTP requests for their intricate interfaces.

What does css sprites does…

Group multiple images together (usually icons or decorative images) into one sprite
Evenly space these images, aligned into one or more lines
Set this sprite to the background image of an element (usually a list)
Position the sprite to display the appropriate image by shifting the X or Y position by a multiple of the spacing
Enjoy the increased speed and reduced HTTP requests

Create your own CSS Sprite…
Step1-Create an image (or collect it from anywhere)using photshop,fireworks,gimp etc.. depends on your choice.
#nav li a.item1 {background-image:url('../img/image1.jpg')}
#nav li a:hover.item1 {background-image:url('../img/image1_over.jpg')}
#nav li a.item2 {background-image:url('../img/image2.jpg')}
#nav li a:hover.item2 {background-image:url('../img/image2_over.jpg')}
#nav li a.item3 {background-image:url('../img/image3.jpg')}
#nav li a:hover.item3 {background-image:url('../img/image3_over.jpg')}
#nav li a.item4 {background-image:url('../img/image4.jpg')}
#nav li a:hover.item4 {background-image:url('../img/image4_over.jpg')}
#nav li a.item5 {background-image:url('../img/image5.jpg')}
#nav li a:hover.item5 {background-image:url('../img/image5_over.jpg')}

As above image displays that img1,img1_over,img2,img2_over
it means that when background position changes image display changes
By using CSS Sprites we are able to lighten up this interface.We may use one single image instead of 6 images.We can combine them into one big image.Create a new image that is as wide as your widest image and and as tall as the combined height of all your images plus X pixels, where X is the number of images you have. Now place you images into this new image, left aligned, one on top of the other with one pixel of white space in between. sprite2
Now look at css after combining the images into one
#nav li a.item1 {background-position:0px 0px;}
#nav li a:hover.item1 {background-position:0px -72px;}
#nav li a.item2 {background-position:0px -143px;}
#nav li a:hover.item2 {background-position:0px -215px;}
#nav li a.item3 {background-position:0px -287px;}
#nav li a:hover.item3 {background-position:0px -359px;}
#nav li a.item4 {background-position:0px -431px;}
#nav li a:hover.item4 {background-position:0px -503px;}
#nav li a.item5 {background-position:0px -575px;}
#nav li a:hover.item5 {background-position:0px -647px;}

There is a single background-image applied to the anchor element itself, and the unique classes merely shift the background position with negative Y coordinates.

During this the HTTP Request time reduces and size of images reduces.This is done for only 6 images ,and if you are usimg it in your website then you will be able to find some dynamic changes.

CSS  Sprite Generator

You may also like...

94 Responses

  1. Gifwhfys says:

    Through friends little lolita nude groups Damn that guy knows how to handle Cytheria. She doesnt know whether to beg him to stop or keep going!

  2. Nrmcfcpl says:

    I’m sorry, I didn’t catch your name lol bbs underage nude Where is that sexy gamergurl we often get the pleasure of seeing post messages on this site? When are we going to see her in her own video? I am patiently waiting for it.

  3. Uewywbxd says:

    We were at school together lolita teenagers 16 18 Her name is Nadia Styles the scene is from white tails videos,and she squirts like un fucking real.Love her nasty talk

  4. Qaqxvtvb says:

    A book of First Class stamps underage lolita nude love I love the way you make love to his cock! Very hot, I will try it with my man tonight!!

  5. Ajynlfiu says:


  6. Ugmlguec says:

    Which year are you in? preteen loli picture hard i finally figured out why i like porn so much. Its because of hot ass fuck girls like her i have to watch.

  7. Olnngedt says:

    A financial advisor lolita hot brunette gives WHAT I LIKE SO MUCH ABOUT THIS CHICK SHE CAN DO IT ALL AND DO IT WELL SHE IS JUST AWESOME.

  8. Gjznxisb says:


  9. Pbnorxhd says:

    Could you please repeat that? ls lolita pay sites really fucking damn hot. i particularly loved the last sex scene which had some great pounding.the babes r just awesome, ahhhh

  10. Cqboubxw says:

    I’d like to open an account lolitas yung sex preteen that girl is sooo fucking hot because she could be your mom, your teacher, works at your bank, etc.. she is so classy and fucking damn fine.

  11. Elioxghq says:

    What’s the interest rate on this account? nn bbs loli erotic I’m with ShakespeareanPerv on this one. That dude is a total douche bag. She is hot though. Made me hard as hell. Mmmmmm

  12. Ycymddet says:

    I like watching football www teen lolias net wats the story with the fucking audio??.. its off by a mile………so fucking annoying especially with such a good vid..

  13. Wnemdmll says:

    I’ve got a full-time job nonude loli models pics Why can’t more women be built like this woman? Most have either no body and slim, or big fake tits and or no ass. Kitten has it all, body, face, THICKNESS, flat stomach. DSLs. GOD SEND ME A GODDESS LIKE THIS.

  14. Gbsmxipf says:

    Is there ? tias wenas lolitas xxx dam looks like she was not getting fucked right anyone agree hey if she is anywhere near virginia beach hit me up i will fuck her right

  15. Knzeblzk says:

    I’m in a band lolita nude photo gallery the only good thing i have to say is that the woman is the absolute hottest thing ever on pornhub. she blew me away

  16. Rcfemahv says:

    Your cash is being counted youngest nn lolita models Damn. That’s the way to enjoy anal… But I’d never do it if it were going to hurt the lady.

  17. Icbcygkl says:

    I’m interested in this position junior young lolita models curiosity killed the cat and my errection, I know I shouldnt have anything to say and I knew what I was in store for when I seen the name, but this is a confused person and if you is turned on by this you are just as confused, to each is own Im not bashing, but this just dont look right!

  18. Rdwuvzlm says:

    I’m doing a masters in law pink lolita model pthc she is perfect – he has a great body – love this vid, and the lovely amount of very sticky cum that she gets covered in at the end – yummy

  19. Vfrabasv says:

    How much notice do you have to give? ls models lolitas child This has quickly become one of my favorite porns of all time. Not only because my favorite pornstrar is in it, but the mood and atmosphere is new and refreshing, even though its a grungy factory

  20. I just want to say I am very new to blogging and honestly enjoyed this web-site. Likely I’m want to bookmark your website . You really have superb articles and reviews. Thanks for revealing your web-site.

  21. 844195 897323Wonderful internet site you got here! Please maintain updating, I will def read far more. It

  22. 564382 441320Hello, Neat post. There

  23. 751118 373827Maintain up the wonderful function , I read couple of weblog posts on this internet site and I believe that your internet site is real intriguing and has bands of very good information . 916850

  24. 319490 785073I truly enjoy looking via on this web website , it holds superb content . 284657

  25. 664860 665826I discovered your weblog internet site on google and examine quite a few of your early posts. Continue to sustain up the superb operate. I basically extra up your RSS feed to my MSN News Reader. In search of forward to reading far more from you later on!

  26. The Zune concentrates on being a Portable Media Player. Not a web browser. Not a game machine. Maybe in the future it’ll do even better in those areas, but for now it’s a fantastic way to organize and listen to your music and videos, and is without peer in that regard. The iPod’s strengths are its web browsing and apps. If those sound more compelling, perhaps it is your best choice.

  27. 570949 562233I conceive this website has very wonderful indited content material posts . 439940

  28. Farmer danrn says:

    The new Zune browser is surprisingly good, but not as good as the iPod’s. It works well, but isn’t as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that’s not an issue, but if you’re planning to browse the web alot from your PMP then the iPod’s larger screen and better browser may be important.

  29. 58122 715694Enjoyed examining this, really excellent stuff, thanks . 227412

  30. homeinsur says:

    The new Zune browser is surprisingly good, but not as good as the iPod’s. It works well, but isn’t as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that’s not an issue, but if you’re planning to browse the web alot from your PMP then the iPod’s larger screen and better browser may be important.

  31. voyance gratuite immediate franceConsulter mon superbe blog voyance gratuite

  32. consulter astrologie free de marseilleVoir mon nouveau blog voyance gratuite en direct

  33. money make says:

    119821 238622Discovered your weblog and decided to have a study on it, not what I generally do, but this blog is fantastic. Awesome to see a website that

  34. Un plateforme afin reparer le blocs de compteurs dans une auto Scenic Consulter ce nouveau site web : reparation compteur

  35. money making says:

    336091 772256I likewise conceive so , perfectly written post! . 583484

  36. la porno Com says:

    You are so interesting! I don’t believe I have read anything like this before. So good to find another person with some unique thoughts on this issue. Seriously.. many thanks for starting this up. This site is something that’s needed on the internet, someone with a little originality!

  37. Blythe Nevin says:

    How can u add a flash slide show to your blogspot?

  38. I do like the way you have presented this specific matter plus it does provide me personally some fodder for thought. However, coming from what I have witnessed, I just hope when other comments pile on that people today remain on issue and don’t start on a soap box involving the news du jour. Still, thank you for this superb piece and even though I can not necessarily concur with the idea in totality, I respect your point of view.

  39. Hi there! I just would like to give an enormous thumbs up for the nice info you may have right here on this post. I will likely be coming back to your blog for more soon.

  40. Dewitt Zorns says:

    My video player in joomla doesn’t play videos in firefox if the latest flash player isn’t installed. I’d like to have it like a professional player to show a dialog saying: “Do you want to install flash player 10” or how it says when you go to a professional website so users don’t have to search and download flash player manually…. . Does anyone know, how to do this?.

  41. I have a degree in psychology, which I have found to be useless. And I am planning on going back to school and getting a Masters in Creative Writing, because I enjoy writing and would love to learn more techniques to make myself a better writer. I am worried, however, that this degree will not open up many doors in terms of the job market (just as my psychology degree has failed to do). Any thoughts? Thank you..

  42. Very good site you have here but I was wondering if you knew of any forums that cover the same topics talked about here? I’d really love to be a part of online community where I can get suggestions from other experienced individuals that share the same interest. If you have any recommendations, please let me know. Many thanks!

  43. I’m not that much of a internet reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your website to come back in the future. Cheers

Leave a Reply