Hi, I've looked through gobs of tutorials, but they all differ slightly. I understand the concept of image sprites, but I just can't get them to work. Here's my CSS, any obvious mistakes??
The image I'm using is attached. Each bar is 75px high and 420 px wide. Each "button" is 100px wide.
P.S. My main reference tutorial can be found here: http://css-tricks.com/css-sprites/
Code:
#navbar li {
list-style: none;
}
#navbar li a {
background-image: url("Images/navigation_bar_images");
width: 420px;
height: 75px;
margin: 0;
padding: 0;
float: left;
}
#navbar01, #navbar02, #navbar03, #navbar04 {
width: 100px;
}
#navbar01 li a {background-position: 0px 0px;}
#navbar01 li a:hover {background-position: 0px -75px;}
#navbar02 li a {background-position: 100px 0px}
#navbar02 li a:hover {background-position: 100px -75px;}
#navbar03 li a {background-position: 200px 0px}
#navbar03 li a:hover {background-position: 200px -75px;}
#navbar03 li a {background-position: 300px 0px}
#navbar03 li a:hover {background-position: 300px -75px;}
The image I'm using is attached. Each bar is 75px high and 420 px wide. Each "button" is 100px wide.
P.S. My main reference tutorial can be found here: http://css-tricks.com/css-sprites/