Quick Tutorial: CSS Sprites

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Voodoo
    ♥ ♦ ♣ ♠
    • Sep 2002
    • 10600

    #1

    Quick Tutorial: CSS Sprites

    Quick Tutorial: CSS Sprites

    http://www.g33ky.com/sprite/

    Hello All,

    I just threw this page together to test out a method for displaying CSS Sprites. Feel free to check it out. I didn't spend much time doing super-cool icons or code formatting or anything... deal with it (), but for those of you who haven't been exposed to sprites before, it may give you some good ideas for your projects.

    The concept is, use 1 image for all of your buttons or icons etc... and use CSS positioning to display the various parts of the image. This causes fewer server requests, faster page loading and less code in general. It's easiest if you set these up on a grid in your Photoshop file.

    Hope it gives you some ideas.

    -V

    "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
  • munki
    Do Fun Shit.
    • Dec 2004
    • 13393

    #2
    Nice tut dawg...


    When can i expect the css fairies run through?

    I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

    Comment

    • Voodoo
      ♥ ♦ ♣ ♠
      • Sep 2002
      • 10600

      #3
      Originally posted by munki
      Nice tut dawg...


      When can i expect the css fairies run through?
      I only have CSS Rootbeers.

      "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

      Comment

      • Ozarkz
        So Fucking Banned
        • Jan 2009
        • 2377

        #4
        Interesting thanks for posting.

        Comment

        • PSD CSS XHTML
          Confirmed User
          • Mar 2009
          • 546

          #5
          Mehhh. I hate fucking with sprites. Nice little sample though.

          . . psd to xhtml/css conversions . . cost effective css template solutions . . and now offering css lessons . .
          My XBIZ profile

          Comment

          • RyuLion
            • Mar 2003
            • 32369

            #6
            Official lame thread of the day..

            Adult Biz Consultant A tech head since 1995
            Affiliate Support: Chaturbate | CCBill Live

            Comment

            • Voodoo
              ♥ ♦ ♣ ♠
              • Sep 2002
              • 10600

              #7
              Originally posted by RyuLion
              Official lame thread of the day..
              It's called a "contribution":
              http://dictionary.reference.com/browse/contribution

              con⋅tri⋅bu⋅tion   /ˌkɒntrəˈbyuʃən/ Show Spelled Pronunciation [kon-truh-byoo-shuhn] Show IPA
              –noun 1. the act of contributing.
              2. something contributed.
              3. an article, story, drawing, etc., furnished to a magazine or other publication.

              You should try it sometime.

              "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

              Comment

              • Mr Pheer
                So Fucking Banned
                • Dec 2002
                • 22083

                #8
                very cool idea

                Comment

                • Voodoo
                  ♥ ♦ ♣ ♠
                  • Sep 2002
                  • 10600

                  #9
                  Here's some more info about them and how Yahoo & AOL use them:
                  http://www.websiteoptimization.com/s...k/css-sprites/

                  "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

                  Comment

                  • StuartD
                    Sofa King Band
                    • Jul 2002
                    • 29903

                    #10
                    Yup, it's a powerful thing... most "5 star ratings" scripts are done this way, as well as many other scripts involving icons of some sort.

                    Good thread
                    This is me on facebook
                    This is me on twitter

                    Comment

                    • Why
                      MFBA
                      • Mar 2003
                      • 7230

                      #11
                      damn voodoo, never used sprites before, thanks for the infos! interesting idea.

                      Comment

                      • mikeyddddd
                        Viva la vulva!
                        • Mar 2003
                        • 16557

                        #12
                        Thanks!


                        Comment

                        • sortie
                          Confirmed User
                          • Mar 2007
                          • 7771

                          #13
                          Originally posted by Voodoo
                          Quick Tutorial: CSS Sprites

                          http://www.g33ky.com/sprite/

                          Hello All,

                          I just threw this page together to test out a method for displaying CSS Sprites. Feel free to check it out. I didn't spend much time doing super-cool icons or code formatting or anything... deal with it (), but for those of you who haven't been exposed to sprites before, it may give you some good ideas for your projects.

                          The concept is, use 1 image for all of your buttons or icons etc... and use CSS positioning to display the various parts of the image. This causes fewer server requests, faster page loading and less code in general. It's easiest if you set these up on a grid in your Photoshop file.

                          Hope it gives you some ideas.

                          -V
                          Good idea.

                          I code in flash so I would do that in flash.

                          Comment

                          • Elli
                            Reach for those stars!
                            • Apr 2003
                            • 17991

                            #14
                            Hot damn, that's the best explanation I've seen for sprites yet! Thanks for the quick demo!
                            email: [email protected]

                            Comment

                            • woj
                              <&(©¿©)&>
                              • Jul 2002
                              • 47882

                              #15
                              nicely done
                              Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
                              Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
                              Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

                              Comment

                              • Sands
                                Confirmed User
                                • Feb 2007
                                • 3134

                                #16
                                I lurve sprites <3

                                Comment

                                • st0ned
                                  Confirmed User
                                  • Mar 2007
                                  • 8437

                                  #17
                                  Very cool, this is new to me. Thanks for sharing.
                                  Conversion Sharks - 1,000+ adult dating offers, traffic management, and consistently high payouts.
                                  We will guarantee and beat your current EPC to win your dating traffic!
                                  Skype: ConversionSharks || Email: info /@/ conversionsharks.com

                                  Comment

                                  Working...