Build Internet has a brand new theme, and that's only the beginning. Read the full story or hide this bar

How to Make a CSS Sprite Powered Menu

How to Make a CSS Sprite Powered Menu

We haven’t gone back to basics in a while.

Today’s tutorial will bring you through the process of building a slick menu using a single CSS sprite image. It’s a simple, but elegant solution for most websites. This was one of the design strategies that first helped me to start using smarter markup. For those of you just getting introduced to this technique today, hopefully you’ll have some similar results.

The end goal is to create a navigation menu that loads quickly, and does not require any dated JavaScript for hover effects. If you’re still using individual images for each menu item, it’s time to upgrade.

The Goal

This CSS sprite will keep HTTP requests down and increase load speed. For a more in depth explanation of CSS Sprites, take a look at Chris Coyier’s article on CSS Tricks. He goes into a wider variety of uses, but this tutorial will focus on getting the navigation done for simplicity’s sake.

The end result

Design the Menu

Breaking from the usual flow of tutorials, we’re going to take a look at part of the Photoshop process before hitting the code. This is in order to demonstrate a simple way of measurement and markers for the menu’s sprite design.

Love the Grid

Rulers and markers are your best friend when it comes to CSS sprites. To take advantage of these guides in Photoshop, turn on rulers through the View>Rulers option in the toolbar. Once rulers are active, you can create a new guide by click on the ruler and then dragging onto the composition area. These guide lines can be used to align your sprite. Alternatively, you can activate the grid overlay through View>Show>Grid.

Guides in Photoshop

In order for the positioning to work in CSS, you’ll need to know the rough coordinates of each menu item inside the sprite. I’ve found it easiest to pick a measurement system that it consistent instead of minimal.

To put it another way, I would much rather remember 100px, 200px, etc than 101px, 342px, etc. Blocking your sprite out in a logical grid also makes future changes significantly less painful, and often requires less adjustment. You can find the example sprite image that I use for this tutorial at the bottom of this post in the source files.

Structure with HTML

The code below will set up a basic menu structure for us to work with in CSS. Feel free to start a new file or insert into an existing menu.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

	<title>CSS Sprite Navigation</title>
	<link rel="stylesheet" href="css-sprites-nav.css" type="text/css" />
	
</head>

<body>
	
		<ul id="menu">
			<li class="home"><a class="selected" href="#">Home</a></li>
			<li class="about"><a href="#">About</a></li>
			<li class="contact"><a href="#">Contact</a></li>
		</ul>

</body>
</html>

A Brief Word on SEO

Our top navigation menu will be structured as a list to keep semantic code. Keep in mind that because these list items will only be displaying an image. The hidden overflow and negative text indent will hide any text from the user’s view. We do not want to leave them blank, because that would give search engines less content to crawl. Even though the images will have text, the search engine will not be aware of this unless we give it actual code to reference.

The Big Idea: As designs become more graphic intense, it is ok to use images (in moderation) as text replacement for elements like navigation, banners, button, etc. If you choose to do this, you still have to account for the search engines.

Position Images with CSS

Copy the code below into your CSS file for the project. An explanation will follow.

/* Everything CSS Sprite Menu */
	ul#menu{margin:0; padding:0; list-style:none; clear:both;}
		#menu li{overflow:hidden; text-indent:-9999px; display:inline; float:left; margin-right:10px;}
			#menu li a{background:url('images/menu-sprite.jpg') no-repeat; width:100%; height:100%; display:block;}
			
			/* Home Button */
			#menu li.home{width:115px; height:60px;}
				#menu li.home a{background-position:-5px -5px;}
				#menu li.home a:hover{background-position:-5px -75px;}
				#menu li.home a.selected{background-position:-5px -145px;}
			
			/* About Button */
			#menu li.about{width:120px; height:60px;}
				#menu li.about a{background-position:-125px -5px;}
				#menu li.about a:hover{background-position:-125px -75px;}
				#menu li.about a.selected{background-position:-125px -145px;}
				
			/* Contact Button */
			#menu li.contact{width:160px; height:60px;}
				#menu li.contact a{background-position:-250px -5px;}
				#menu li.contact a:hover{background-position:-250px -75px;}
				#menu li.contact a.selected{background-position:-250px -145px;}

Change Image with Background Position

The background-position CSS property allows you to specify a set of coordinates on the background image. The benefit of this is that you can load a single background image for a number of elements, but give individual ones their own coordinates. This property is the backbone of CSS sprites.

You’ll remember that we gave each menu list item its own class. This allows us to target them individually for background image coordinates. The background image has already been defined by the general anchor tag style, so the only change that needs to be made for each menu item is the positioning. Especially on larger projects, keeping down the number of redundant styles is key to keeping sanity.

Using this method, we created three unique states for the navigation:

  1. Default is displayed to start
  2. Hover is activated by mouseover
  3. Selected indicates the current page location. It can be activated by a special “selected” class assignment

Unless you’re building something out of the ordinary (e.g. multi-tiered menu), you’d have a hard time needing anything past these three states.

Wrapping Up

By this point you should have a menu driven by a single image. As Chris Coyier’s article brings up, this lowers HTTP requests and allows a smoother loading experience than a long list of bulky separate files for each element. Condensing is good for pages.

I’ve put together a ZIP file of source code and demo for further help. The example in the file is a little more comprehensive, but still follows the principles of this tutorial. Having any errors or confusion about the process? Leave a comment below and we’ll try to sort things out.

Wordpress.com stats not installed! Posted Tuesday, January 26th, 2010 / Back to Top

I this post. Tweet
SPONSOR

130 Comments 82 Mentions

  1. Eric B. Author Editor

    CSS sprites are really one of the best things ever that I have discovered! They’re not too hard to make, and make everything go much more quickly.

    I’m actually currently in the process of converting someone’s old navigation menu consisting of an image for each navigation menu item, an image for each hover state, using Javascript for a basic hover effect like the one in this demo. *shudder*

    Thanks for this nice and helpful tutorial.

    January 26, 2010 · Reply

  2. Montana Flynn Author Editor

    Thanks for going over CSS sprites, I used a similar technique today.

    January 26, 2010 · Reply

  3. Melvin José Author Editor

    Would love to see a detailed explenation of the “a.selected” technique.

    January 26, 2010 · Reply

  4. Gustavo Guichard Author Editor

    Unfortunately if you’re using PNG with background-positioning, it won’t be transparent on IE6. This is sad!

    January 26, 2010 · Reply

  5. Hunter Satterwhite Author Editor

    Really nice and simple.
    @Gustavo I’m sure a javascript PNG fix would let IE6 join the party with out a problem.

    January 26, 2010 · Reply

  6. Gustavo Guichard Author Editor

    @Hunter, Any suggestions?

    January 26, 2010 · Reply

  7. Hunter Satterwhite Author Editor

    @Guastavo sure thing! Andreas Eberhard has written a very nice jQuery plugin to fix png’s. He’s even included various instructions in the file heading on how to use it on document load and in noconflict mode.
    http://jquery.andreaseberhard.de/pngFix/index.html

    January 26, 2010 · Reply

    • Zach Dunn Author Editor

      Thanks for the help Hunter!

      January 26, 2010 · Reply

      • ashutosh Kumar Author Editor

        saving images in PNG24 takes care of IE6 rendering problem…no hack needed.

        March 22, 2012 ·

  8. Vel Author Editor

    I’d add a.selected {cursor: pointer;} in css to make selected link to look like tab, and not link :)

    January 26, 2010 · Reply

  9. Gustavo Guichard Author Editor

    @Hunter, Thanks buddy!
    @Vel, I think it’s nice the way it is… Just thought

    January 26, 2010 · Reply

  10. güvercin Author Editor

    this is wonderfull example .. thanx gay!

    January 26, 2010 · Reply

  11. Saw Htoo Author Editor

    Thanks for the post. I have never used that technique before. Thanks! :)

    January 26, 2010 · Reply

  12. e11world Author Editor

    This is the first time I actually consider using this method just because you made it look so easy. I guess I also never bothered with it that much but your explanation and code is easy to understand. Thanks!

    January 26, 2010 · Reply

  13. BigM75 Author Editor

    nice article, cool plugins

    January 26, 2010 · Reply

  14. Ardit Veliu Author Editor

    I use spriting for most of my projects but the way I originally learned it seems my CSS ends up a little bulkier than yours, going to have to look into that.
    p.s. My first time commenting here and the comment box is pretty awesome.

    January 26, 2010 · Reply

  15. Wayne Author Editor

    if you have fireworks it can do all the html/css/math for you with this cool plugin:

    http://www.andrewingram.net/articles/generating_sprite_navigation_from_fireworks/

    January 26, 2010 · Reply

  16. Hunter Author Editor

    @Vel nice idea! Now we should tie in some jQuery to make it fadein/out or ease some how to give it that little bit of “oomph” that people enjoy.

    January 27, 2010 · Reply

  17. Ward Author Editor

    Nice tutorial. Going to be using this a lot;)

    January 27, 2010 · Reply

  18. Webstandard-Blog Author Editor

    Nice posting Zach, but I’m not a friend of Sprites with text-content in it. You have to update the sprite-graphic every time your navigation is updated with new or changed “content”. If you develop multi-lingual projects, this kind of sprites aren’t the best solution.

    January 27, 2010 · Reply

    • BertieorBirdie Author Editor

      I could watch Schdilenr’s List and still be happy after reading this.

      September 20, 2011 · Reply

  19. Hunter Author Editor

    @Webstandard-Blog good points, but is it really that much trouble to update a navigation bar with the way we do things today?

    If you’re worried about custom fitting text in different languages, than why not use something like sIFR to achieve the look and feel of the text and maybe expanding the sprite to include small, medium, and large size graphics to accommodate varied text sizes.

    January 27, 2010 · Reply

  20. Webstandard-Blog Author Editor

    @Hunter: Sprites are a good decision, thats not the question, but I would prefer a solution with just the “bottom-part” of the tabe images, rest of it made by text and css. So you aren’t addicted to the image or the language, if you know what I mean.

    By the way sIFR, would be a nice solution too and thx for your feedback!

    Greetings from Berlin ;o)

    January 27, 2010 · Reply

  21. Hunter Author Editor

    @Webstandard-blog oooooh yea just the “bottom-part”, now that just simplifies the whole process and combined with sIFR you’ve got a design easy to manage across different languages. It would even be great for using word as long as “Donaudampfschiffahrtsgesellschaftskapitän”. :)

    January 27, 2010 · Reply

  22. Ed Baxter Author Editor

    A great tutorial. I think if you can use them right sprites can help your site so much. My only concern is using text inside the graphic. I know that this is not an issue in terms of SEO due to the text-indent CSS however it can make things trickier if you have lots of sprites and need to keep opening Photoshop to change the text around.

    Great tutorial never the less!

    January 27, 2010 · Reply

  23. josekerekes Author Editor

    In case we want to use png images with alpha transparency in a sprite in ie6, we will encounter a problem.Using filter alphaImageloader is a solution to our problems but filter does not have background positioning.Fortunatelly the belatedPng script comes to our rescue, saving the day.It uses vml to handle png -s and yes it can handle background-positioning.If you are not bothered to use a script for fixing ie6 bug for suporting alpha transparency, or you don’t care about ie6 then everyting is allright.

    January 28, 2010 · Reply

  24. reza Author Editor

    i’ll use

    #menu li.home a:active{background-position:-5px -145px;}

    instead of

    #menu li.home a.selected{background-position:-5px -145px;}

    January 28, 2010 · Reply

  25. Benjamin Walsh Author Editor

    Anyone else notice that this isn’t working in ie8? Unless its on the fritz again.

    January 28, 2010 · Reply

  26. Webdesign Rosenheim Author Editor

    Grrreat tut!
    I’ll try this on the next webdesign project!
    Thanks for sharing!

    January 28, 2010 · Reply

    • davetiye Author Editor

      great article

      April 4, 2013 · Reply

    • davetiye Author Editor

      i believe this nice for webmasters

      April 4, 2013 · Reply

  27. jitendra vyas Author Editor

    oh, nothing is showing if images is disabled. i usually surf with images disabled because i’ve very low internet conncetion and i keep images disabled in my mobile phones browser also to save bandwidth.

    It would be better if upon images disabled atleast simple hyperlink should be shown

    January 28, 2010 · Reply

  28. Tutorijali HDonWEB Author Editor

    Great css tutorial :-)

    January 29, 2010 · Reply

    • davetiye Author Editor

      nice and knowlogable

      April 4, 2013 · Reply

  29. Michael Szczepanski Author Editor

    Very simple and a great starting point. Thanks!

    February 1, 2010 · Reply

  30. Complain.O.matic Author Editor

    I will be using this on my companies site when I do their redesign. As usual great tutorial.

    February 2, 2010 · Reply

  31. manidf Author Editor

    nice one.

    February 3, 2010 · Reply

  32. zur4ik Author Editor

    nice :))

    February 7, 2010 · Reply

  33. Ezrad Lionel Author Editor

    In case anyone was wondering just how many sprites you could stick together, don’t bother trying with background-image. you’ll end up with a 2 second clip that bogs down your cpu. i have a method that gets infinite (depends on your pc ram) frames with virtually no cpu use. an example of a short sub 30 frame clip with dispersed frame interleaving for stress tests.

    http://novatvmedia.com/vved

    type v-v-e-d to see stats, try out in different browsers. and if you happen to try using your own tiles you’ll realize that yes indeed, internet explorer is shitting on the benchmark. notice also the sporadic nature of most rendering engines especially chrome.

    February 10, 2010 · Reply

  34. tuna Author Editor

    simple and nice, thanks..

    February 11, 2010 · Reply

  35. Nicole Author Editor

    Hi!

    thanks for that great tutorial. It was really easy to implement the css sprites (I finally understood how they work :)) and works like a charm.

    Nicole

    February 18, 2010 · Reply

  36. Mark James Author Editor

    Excellent tutorial, only just found out about this method! Will definately give it a go

    February 19, 2010 · Reply

  37. webdesign tom Author Editor

    wow, nice tut! thanks a lot, i’m going to use this technique! Does ist also work on my best friend IE?

    February 24, 2010 · Reply

  38. jakobsweg pilgern Author Editor

    thanks for this tut!
    sure, css sprite is the best way to implement hover effects!

    February 24, 2010 · Reply

  39. Hian Battiston Author Editor

    Simply an great tutorial! Thanks

    March 5, 2010 · Reply

  40. Onigiri Author Editor

    indeed a great tutorial, i was able to make my first ‘sprited menu’ thanks to it.
    I have a big question though: how would you add submenus to some of the menu items? I’ve been looking all over the net but can’t seem to find a solution…PLEASE HELP!!

    March 9, 2010 · Reply

    • Zach Dunn Author Editor

      @Onigiri

      That’s far outside the specification of this tutorial. I recommend you create a secondary div which is replaced using jQuery based on which menu item is selected. Past that, I think you’d be best suited with a Google search.

      March 11, 2010 · Reply

  41. webseite erstellen Author Editor

    I studied the css tutorial and I really learned a lot. I think my next homepage will be a lot better than my first one.

    April 7, 2010 · Reply

  42. Rob Author Editor

    I suppose you could use the same principle to make seo friendly h2′s etc, would just mean a pain if you wanted to change the text in your CMS.

    April 21, 2010 · Reply

  43. Sas Author Editor

    @Hunter: I have a page with CSS spites and jquery.pngFix.js doesn’t work properly unfortunately… It’s scaling all backgrounds and I see the whole sprite-image everywhere… :( …or I did any mistake?!

    Any suggestion?

    April 22, 2010 · Reply

  44. Juegos Author Editor

    You guys rock, very useful trick. Thank you.

    April 28, 2010 · Reply

  45. Barry Author Editor

    Great tut Zach. Just what I needed, nice+concise.

    May 28, 2010 · Reply

  46. wantfee Author Editor

    That is lovely. Thanks!

    June 11, 2010 · Reply

  47. Ryan Fitton Author Editor

    Hi i loved this tutorial but how could i make the menu center itself to my webpage but keep centered when i alter the width of the browser?

    July 1, 2010 · Reply

  48. Zeoplan Author Editor

    Thanks :)

    July 24, 2010 · Reply

  49. Web Design Hippo Author Editor

    Thanks for this, real helpful. I have only used a similar technique recently!

    August 4, 2010 · Reply

  50. Richard Schroder Author Editor

    Zach Dunn … a prince amongst men for this tutorial.

    Thank you for the plain English.

    Worked first time for an intern using her own images.

    Good show!

    (spontaneous note)

    August 12, 2010 · Reply

  51. volkan Author Editor

    good menu

    September 3, 2010 · Reply

  52. Rizwan Javaid Author Editor

    Very nicely explained. Great graphics.

    Thanks guys!

    September 16, 2010 · Reply

  53. Hiren Khambhayta Author Editor

    Nice one, have used it in my website, its really speed boosting.

    September 22, 2010 · Reply

  54. Chris Author Editor

    First off, I’m sorry my bad English.
    I’ve a css sprites menu with other code and it is working on. My problem appear when I try to adapt it to WordPress 3.0.1 with a new function called wp_nav_menu().
    Basically my menu does not appear when I try to adapt my sprite. Are you trying to do it with yours?
    I hope you understand my English hehe, I’m sorry and thanks for this tutorial.
    Cheers!!

    October 11, 2010 · Reply

  55. rexusdiablos Author Editor

    Is there any chance at all that you’d be able to give me a few pointers on layer styles for the text in Photoshop. Any chance of a few metrics for the shadow of the white text and how you achieved the inset effect for the black text?

    October 11, 2010 · Reply

  56. rexusdiablos Author Editor

    Is the font Beba Neue by any chance?

    October 11, 2010 · Reply

  57. soma Author Editor

    Using filter alphaImageloader is a solution to our problems but filter does not have background positioning.Fortunatelly the belatedPng script comes to our rescue, saving the day.It uses vml to handle png -s and yes it can handle background-positioning.

    October 20, 2010 · Reply

  58. rory Author Editor

    very nice, I never knew you could do that. I have been using individual images for each navigation tab, but I may just change my ways. great post

    October 28, 2010 · Reply

  59. Stephen Webb Author Editor

    As someone who regularly uses sprites in their work I can see this is a great introduction into the technique.

    I’ve never seen the ‘selected’ class used before so I’ll be incorporating this into my workflow next time I have to develop a sprite menu.

    Great graphics here, I particularly like the usage of subtle drop shadows and textures!

    October 29, 2010 · Reply

  60. Douglas Author Editor

    For those of you who are tired of constantly updating sprites, check out this new php css sprite generator. It automatically produces an optimized sprite, allows custom configuration and automatically adds the offsets to your css declarations.

    http://www.SpriteMeister.com

    November 21, 2010 · Reply

  61. eric Author Editor

    thanks for this tutorial, I’ve successfully tried this tap menu.
    This turorial is useful to me and now I will try to change color
    in accordance with the character of my blog,
    regard

    December 22, 2010 · Reply

  62. Liminal Design Cornwall Author Editor

    Nice tutorial, going to give it a go for the new studio site we are developing. Also thanks to Douglas for the link – very handy! Thanks.

    Ryan

    December 31, 2010 · Reply

  63. bill Author Editor

    awesome dude saved me a lot of headache thanks :)

    January 23, 2011 · Reply

  64. jokonardi Author Editor

    great job….i like jquery menu …
    thanks…

    January 31, 2011 · Reply

  65. daniel Author Editor

    I need to style a list generated in Drupal. The distinguishing classes are added to the link tag. How would you rephrase the syntax to reference the classes there?

    February 1, 2011 · Reply

    • daniel Author Editor

      okay. I was able to bump my distinguishing classes to the li tags. But the ul tag has no id and a class=”menu”. I changed all the hash symbols to dots, but it has no effect on the list. Recommendations?

      February 1, 2011 · Reply

      • daniel Author Editor

        Got it. Thanks for the tutorial.

        February 4, 2011 ·

  66. Lasha williams Author Editor

    awesometutorial. i like :love: ` thanks : )

    February 4, 2011 · Reply

  67. Ali Author Editor

    I can’t find the link to the .Zip file. Can anyone post it here?
    Thanks!

    February 7, 2011 · Reply

  68. Mustafa Author Editor

    thank u very muchh

    February 10, 2011 · Reply

  69. web design manchester Author Editor

    The menu uses sprites .. can anyone suggest a good sprite generator as its easy i guess … but will say this tutorial has given me good advice about menus. Thanks

    February 28, 2011 · Reply

  70. Eddie Author Editor

    [quote]can anyone suggest a good sprite generator[/quote]

    See spriteme.org it does it to your site.

    March 2, 2011 · Reply

  71. Eddie Author Editor

    [quote]I can’t find the link to the .Zip file[/quote]
    Look for the download button below his picture.

    March 2, 2011 · Reply

  72. Simon Author Editor

    Hi thanks for this tutorial. It seems to work really good. I’m going to use it on my site for my social links roller over buttons. I also love the menu idea you’ve shown, I might seek “inspiration” from it one day ;) Also the part about turning the rulers on in photoshop was a big help!! Duh, I should have thought of that one earlier, but makes things a LOT easier :)
    haha, Cheers! Simon.

    March 2, 2011 · Reply

  73. oren Author Editor

    hi.
    thank you for this tutorial.
    i do have one problem – when i mouse-over on the tab of the current active page, the hover effect works. i want it to work only for the other tabs and not for the active one.
    how can i do that ?
    thanks again :)
    oren

    March 12, 2011 · Reply

  74. John Author Editor

    Hey Oren,

    Did you figure out your ‘hover’ issue?

    thanks….

    March 23, 2011 · Reply

  75. Joey Author Editor

    Could someone please be so kind on explaining how to integrate some jQuery to make it fade in/out or ‘ease’ some how? Also achieved by unitising a search engine friendly method.

    Many thanks

    March 29, 2011 · Reply

  76. omar Author Editor

    thank you tis very useful

    April 2, 2011 · Reply

  77. cryoffalcon Author Editor

    thanks for sharing this information it is really helpful. And i wanted to use sprites from long time.
    take care.

    April 5, 2011 · Reply

  78. Joey Author Editor

    Could someone please be so kind to explaining how to integrate some jQuery to make it fade in/out (easing) some how? Also achieved by utilising a search engine friendly method.

    Many thanks

    April 6, 2011 · Reply

  79. Artyom Shmatok Author Editor

    That that is necessary for me.
    Thanks!

    April 13, 2011 · Reply

  80. arifur rahman Author Editor

    here is a nice article about css sprites.

    http://learneveryday.net/css/css-sprites-for-website-performance/

    April 24, 2011 · Reply

  81. Punyada Author Editor

    thanks nice tutorial..

    June 2, 2011 · Reply

  82. Adam Author Editor

    I have a lot of small elements [like the blockquote start + end and other things ] that the google speed test recommened to be piled into a sprite. Am thinking of implementing it soon since you made the tut look so easy. Thank you so much!

    June 16, 2011 · Reply

  83. Dbarlok Author Editor

    Thanks for this!

    August 1, 2011 · Reply

  84. Ally Author Editor

    Great tutorial! I was studying another tutorial that did the same thing but the CSS code here is, to a complete beginner like me, way cleaner, better organized and a lot easier to understand.

    August 16, 2011 · Reply

  85. Diego Author Editor

    All yuor tutorials are interesting. I would like you to put a demo of them

    August 17, 2011 · Reply

  86. sam Author Editor

    I found nice article for CSS code.Thanks for sharing this important article. Currently i am facing issue with me web site.My web site taking lots of time for loading.If you have any important tips please share with me.

    Thanks,
    Sam

    September 15, 2011 · Reply

  87. BillyJr Author Editor

    Hi, Thanks for graet tutorial, but could you telle me how .selected class is changed? Do I need JavaScript to use it, because it doesn’t work on my site?

    September 28, 2011 · Reply

  88. KB Author Editor

    Another cool implementation of CSS sprite: Dynamic CSS Sprite implementation to give a painting effect. Read how to implement it by reading an easy to follow tutorial at
    http://blog.kunals.com/dynamic-css-sprite-implementation-gives-a-painting-effect/

    October 13, 2011 · Reply

  89. Kisstopher Author Editor

    Where is the zipped source code file?

    October 20, 2011 · Reply

  90. tarakbr Author Editor

    Hi! nice tutorial but providing the mentioned zipped file would be great; i have problems implementing it and i am sure the zipped file will help. Thanks in advance.

    October 22, 2011 · Reply

  91. HaMiD Fadaei Author Editor

    Very Useful

    Thanks

    :D

    You OK

    November 3, 2011 · Reply

  92. mahsa Author Editor

    hiiiii zach
    thanks alot!!!!

    November 7, 2011 · Reply

  93. Neil Gee Author Editor

    Thanks for this! works great

    November 11, 2011 · Reply

  94. Juve Colunga Author Editor

    Thanks a lot, too comprehencive tut

    November 18, 2011 · Reply

  95. Toni Author Editor

    I’m following you so far and it has been relatively easy once I got over the learning curve. I’m puzzled though as to where these coordinates come from:

    #menu li.home a{background-position:-5px -5px;}
    #menu li.home a:hover{background-position:-5px -75px;}
    #menu li.home a.selected{background-position:-5px -145px;}

    I have all of my width and heights for my three states but I just don’t know how to do the background position. Help! Please. Thanks.

    December 10, 2011 · Reply

    • Ryan Johnson Author Editor

      Hey Toni, the those positions come from what you see under the “Love the Grid” section. Put it this way:

      > Your height and width are like a square hole in a piece of paper.
      > The sprite is like another piece of paper with a bunch of images. While you have a bunch of images, you can only see whatever through that hole on the top piece of paper (height/width).
      > The overflow:hidden is what hides the rest of the sprite paper except for what can be seen through that hole.
      > Background-position basically shifts the sprite piece of paper around to display the desired sprite image you want to snugly display.

      That’s just how I imagine it, but hopefully it helps!

      January 27, 2012 · Reply

  96. Arjun Rajiv Author Editor

    Thanks a lot, great tutorial…..

    January 20, 2012 · Reply

  97. Candice Author Editor

    Marriage makes or mars a man.

    February 11, 2012 · Reply

  98. lv wallet Author Editor

    In 1909, louis vuitton purse family used silk and wool to make “Kashmir” travel blanket, which became the pioneer of scarf and quilt cover.

    March 17, 2012 · Reply

  99. AgepeCen Author Editor

    view beats by dre suprisely

    March 24, 2012 · Reply

  100. iannelsonks Author Editor

    Really good write-up and actually helps with comprehending the article much better.
    My partner and I were sent here seeing as this particular post has been tweeted by a guy I was following and am delighted I made it here. [url=http://santiagohens82.xanga.com/759878207/with-these-home-improvement-tips-bob-the-builder-will-have-absolutely-nothing-on-you/]haircut Coupons for you[/url]
    [url=http://michelmccall5113606.blog.hr/2012/03/1630307037/big-home-improvement-jobs-should-be-done-by-professionals.html]Promotional codes,Printable Swiffer Wet Jet coupons, and discounts[/url]

    I have to point out you put together several fine points and will probably write-up a a small number of options to add on as soon as a day or two.

    March 24, 2012 · Reply

  101. hakan yıldız Author Editor

    Thanks for , real helpful. I have only used this

    May 6, 2012 · Reply

  102. mike1002 Author Editor

    nice tutorial, thank for contribution

    June 8, 2012 · Reply

  103. kurban Author Editor

    GÜZEL VE YARALI OLDU

    November 1, 2012 · Reply

  104. dg Author Editor

    Loved the article

    But as always, no source file
    and nothing I’ve tried has worked

    so fustrating when I follow online tutorials only for them to fail

    November 26, 2012 · Reply

  105. Best Project Author Editor

    Very nice tutrial, great work.

    February 7, 2013 · Reply

  106. davetiye Author Editor

    Hi! nice tutorial

    February 24, 2013 · Reply

  107. Pawel Author Editor

    Thanks a lot, great tutorial.

    March 12, 2013 · Reply

  108. payoretregrer Author Editor

    [url=http://freerunwomensale.webstarts.com]nike free run women[/url] Do not be scammed by such companies3) Advertising and Marketing ploys – There are a lot of companies out there who would pay you to read email or to answer surveys These companies can be legitimate and would actually send you money for the effort required to check your email once in a while This can be a great idea for easy work at home if you find the right companies However, you should also be wary as some people merely use this technique as a ploy to install various types of malware on your computer [url=http://cheapfreesale.webstarts.com/]cheap nike free[/url] 6Include all other necessary travel expense for your commercial vehicle Remember to request and include receipts for parking, tolls, etc This is usually an amount that can be claimed even if you claim the standard mileage deduction on your truck 7 http://nikefreerun3leathershoes.cabanova.com/.
    [url=http://nikefreerun3leather.tumblr.com/]Nike Free Run 3 Leather[/url] 2 Customers want to be sold They know youre not putting up websites and creating brochures so youll feel good and collect gold stars for your Permanent Records And if they want your service, theyre looking for reasons to say yes Think of all those Madison Avenue ads with the theme, You deserve it [url=http://cheapnikefreerunsale.tumblr.com/]cheap nike free run[/url] You need to stay with muted colors with awesome undertones and also smooth neutrals and famille rose The colors that it will work greatest with your complexion are natural powder blue, messy red, mauve, violescent, plum as well as pale yellow-colored.

    April 9, 2013 · Reply

  109. payoretregrer Author Editor

    [url=http://cheapfreerunnew.webstarts.com/]cheap nike free run[/url] Thats an old way to sell ads The high powered ad agency worked with David Orreck for several days to get those vacuum cleaner commercials to sound like one-takes Avoid two-voice “slice-of-life” ads Many are made by dragging the receptionist into the studio to play the wife or mother and the result is something that sounds like the junior high school drama class made it Steer clear of characterizations The last of the great character actors on radio was Mel Blanc and he died 20 years ago An 18 year old kid trying to sound like a crusty ol sea captain doesn’t get it [url=http://nikemagforsaleshoes.blogspot.com/]nike mag for sale[/url] Then, it gets easier and the extra hours of work you put in will prove to be nothing short of an amazing investment Effectively Market Yourself On The Web Many job seekers spend too much time mulling over whether their resume is any good instead of focusing on what they look like off paper If you want people to recognize you (which is the only way to achieve what you set out to), write a solid LinkedIn profile with a flattering picture, begin getting articles published (you can start on EzineArticles) and start a blog with your work Speaking of blogs, if you have a personal blog – be it about cooking, childrearing, your favorite books, or whatever else – either totally isolate it from your professional self online, or go back and read your archives with the eye of a prospective employer Anything you wouldn’t want to read about an employee yourself, delete http://www.lebron10xbasketball.com.
    [url=http://nikemercurialvaporsmake.webs.com/]nike mercurial vapors[/url] It can also help to get rid of a loan with higher interest rates The individuals can opt to refinance based on both the above said facts This decision should be made after a thorough analysis of the financial background With such a refinancing loan, your new lender will pay off your old debts and start the loan with fresh terms and tenure In most cases, the new loan will have a longer tenure that will reduce the monthly payments [url=http://www.nikefreetiffany.com]nike free run 3[/url] If the inevitable happens and your corporate gift order is late/delayed or you just forgot to buy a gift, be assured there’s a whole market sector formed around last-minute corporate gifts From magazine subscriptions to concert/sports tickets to gift certificates to an impromptu night out at a popular restaurant or club, most online corporate gift stores and sites will have a section on last-minute corporate gifts Now the hang tag or swing ticket manufacturers are focusing on innovative items, such as leather hang tags, fabric hang tags, metal hang tags and cork hang tags among othersHang tags have metamorphosed to become a vital part of branding a merchandise Rather than sticking out as a sore thumb on sophisticated looking merchandise, hang tag manufacturers are offering choices that not only suit but actually complement your product But a hang tag is more than a silent crusader for the image of your product Its actually a very useful article providing important information about the product ( ) in a concise and distinct manner.

    April 9, 2013 · Reply

  110. how to make money buying and selling used cars Author Editor

    Woω, amazіng weblog ѕtructure! How long hаve you ever been blogging fог?
    you made blogging glаncе easy. The full glаnce of your wеb site is
    wondегful, lеt alonе the contеnt mаterіal!

    Checκ out my blοg; how to make money buying and selling used cars

    April 9, 2013 · Reply

  111. payoretregrer Author Editor

    [url=http://cheapiphone52.blogspot.com/]Cheap iphone 5[/url] We havent even looked at affiliate sales and marketing but Im sure you get the picture The basic idea of selling over the Internet sounds good but theres a lot more to it than most people realiseForex Currency TradingSomeone said that trading is the last frontier, the last place where men and women can stand up and pit themselves against the worldIt sounds very Wild Westish but most of it is true! You win or lose entirely by your own efforts and if you win, its like having your very own bank However, even owning a bank is a business and you still have to work hard to put the money there and to keep it!Unlike Internet marketing where all your efforts, in one form or another, are geared towards making people join your list and then selling them stuff, Currency Trading has no customers [url=http://cheapiphone52.webs.com/]Cheap iphone 5[/url] The engine coach ride back again is approximately 2 hours and you will wish to be dried out and cozy Along with arranging your journey in advance, We highly recommend a person book your chairs using the webSo youre considering starting a small business00 marketing t-shirts online Marketing t-shirts could be a versatile and lucrative method to make a living and when you might be interested in tee shirts, it may appear to be a perfect chance to turn a spare time activity into earnings flow To assist get the business began and hopefully view it flourish as well as thrive, there are some things have to think about If you are seeking to design then sell your personal customised tee shirts online and/or intending to work as a merchant for established creative designers, it is very important obtain the right installation from the beginning Altering the format and appear of the business or even brand after you have began selling your tee shirts online can be hugely hard, so take some time out investigation the options as well as decide what is going to might be best for you personally Probably the most traditional as well as the the majority of time-consuming method to sell tee shirts online through creating your personal web site, managing your personal payment digesting and arranging your own printing and delivery http://qx19ld3yzf.cabanova.com/.
    [url=http://iphone4sunlocked6.blogspot.com/]iphone 4s unlocked[/url] You will find partial draw ups, draw ups involving an array of movement, and something handed draw ups, all of which causes the muscles in order to exert themselves in another way This really is called muscle confusion exercises, which is suggested by every instructor and personal trainer all over the world which you use muscle confusion exercises in case you wish to obtain fit as well as slim down Individuals look at the pull up pub and believe “There is not any way I could lift my figure weight along with just my hands Right after visiting this milestone, you will leave having a deeper knowledge of American background from the People from france and Indian Battle and Revolutionary Battle phases from the 18th hundred years Another question t hat has existed for hundreds of years is actually Niagara Drops Come as well as explore the noisy roar and amazing beauty of this particular natural landmark adored by generations associated with visitors like a supply of wonder as well as awe You can travel to the pretty waterfalls, fascinating attractions and four hundred acres of guarded wildlife This is an event your family can never neglect [url=http://cheapiphone52.webs.com/]Cheap iphone 5[/url] Federalreviewscom This site present over 600 articles and reviews about internet marketing, ebooks,and online and offline Gurus They guarantee that you can save thousand of dollars They have spent a huge amount of money to conduct test and review for different business opportunities.

    April 9, 2013 · Reply

  112. paNtannangopY Author Editor

    [url=http://karenmillenoutlet-sale.info/]karen millen dresses[/url]
    [url=http://karenmillenoutlet-sale.info/]karen millen dress[/url]
    [url=http://karenmillenoutlet-sale.info/]cheap karen millen dresses[/url]

    April 10, 2013 · Reply

  113. payoretregrer Author Editor

    [url=http://kj1w2e1flp.cabanova.com/]cheap iphone 16gb[/url] Trade Deadline and 40-Man Roster – The trade deadline in baseball is more exciting than any other, as teams are making moves for now and for the future Big names are dealt, prospects are dealt – it’s always interesting to watch What’s even better than the trade deadline itself is what happens immediately after After the trade deadline, MLB rosters expand to 40 people instead of the usual 25 This allows teams to, once again, strategize to the max [url=http://wholesaleiphone4s2.weebly.com/]wholesale iphone 4s[/url] The launch of two new shoes, shoes sandals were chosen carved and adapted from Wing Tip Shoes Moccasin shoes Helmut Desert Boots Apart from the strong British-style design outside, Swims for the harsh material is from the John Lobb at the same strain Selection of 3M Scotch Guard high density nylon uppers excellent texture, waterproof performance is second to none, is lined with an additional waterproof coating, such a “double insurance” will surely be designed to protect the wearer’s feet wet With such a stylish rain boots, rain can be any time with their dress, to show their own unique sensenike shoes: jordan retro 5 men’s air jordan vii retro http://wholesaleiphone4scheap.webstarts.com/.
    [url=http://iphone5unlockedshoes.webstarts.com/]iphone 5 unlocked[/url] 7 Homework for Seller- Give the sellers a list of items to have ready for you at the appointment, such as keys, utility bills and information on their loan This will let you know when you arrive that they are ready to list with you! If the seller has already decided to list with you then it isn’t necessary to deliver a long presentation and try to sell yourself8 Questions to Ask Other Agents – Provide a list of questions to ask other agents, which position your strengths and marketing strategies favorably [url=http://wholesaleiphone52.weebly.com/]wholesale iphone 5[/url] But a cover letter attracts the attention of the hiring managers towards the interests and strengths of the candidate Cover letter is useful, but sometimes it can cause a person to lose the job opportunity This happens due to the mistakes an applicant make in the resume cover letter The five common mistakes in a cover letter are as follows:1 Failing to address properlyOne of the biggest mistakes while making a cover letter is that candidates do not address the hiring authorities properly.

    April 10, 2013 · Reply

  114. davetiye Author Editor

    I had started to write CSS code 2 years ago but I have never seen it before.

    April 13, 2013 · Reply

  115. Ralph Lauren UK Outlet Author Editor

    What a information of un-ambiguity and preserveness of valuable know-how
    on the topic of unpredicted feelings.

    April 17, 2013 · Reply

  116. cars for sale by owner under 2000 Author Editor

    Hey! I just wish to give a huge thumbs up for the great information you could have right here on this post.
    I will likely be coming again to your weblog for more soon.

    April 20, 2013 · Reply

  117. Iesha Author Editor

    I was curious if you ever thought of changing the structure of
    your website? Its very well written; I love what
    youve got to say. But maybe you could a little more in the way of content so people could connect
    with it better. Youve got an awful lot of text for only
    having one or 2 images. Maybe you could space it out better?

    May 2, 2013 · Reply

  118. Sarah Author Editor

    This is wonderful .. I can’t wait till I’m using it

    May 17, 2013 · Reply

  119. West Midlands SEO Author Editor

    Great post.

    May 18, 2013 · Reply

  120. West Midlands SEO Author Editor

    Great post, css is really powerful!

    May 18, 2013 · Reply

 

Join the Conversation

Back to Top / Comment RSS

2012 Build Internet. Created by One Mighty Roar. Icons by Komodo Media. Back to Top