Skip to content

Instantly share code, notes, and snippets.

@dylanfries
Created July 23, 2010 17:59
Show Gist options
  • Save dylanfries/487790 to your computer and use it in GitHub Desktop.
Save dylanfries/487790 to your computer and use it in GitHub Desktop.
/* ********* nav *********** */
/* required for nav_mixin */
/* $nav_height: 50px */
/* $nav_button_width: 133px */
/* $button_count: 6 */
@mixin sprite($i)
width: $nav_button_width
background-position: -1 * ($i - 1) * $nav_button_width 0
&:hover
background-position: -1 * ($i - 1) * $nav_button_width -1 * $nav_height
&:active
background-position: -1 * ($i - 1) * $nav_button_width -2 * $nav_height
#nav
width: $content_width
height: $nav_height
margin: 0 auto
#menu_items
height: $nav_height
margin: 0 auto
cursor: pointer
.nav_item
width: $nav_button_width
height: $nav_height
float: left
position: relative
background: url('../images/nav_sprites.jpg') no-repeat scroll 0 0
border: none
@for $i from 1 through $button_count
#nav1
@include sprite($i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment