...

View Full Version : CSS Sprite Issues



lmw1
05-18-2012, 09:22 AM
My hair is now all gone! Can someone explain what I am doing wrong here?

My sprites aren't cooperating with me for some reason.

Thanks in advance!
LMW1

abduraooft
05-18-2012, 10:34 AM
Remove the background from the ul and then apply it to the anchors, like

#mainNav li a{
background:url(/images/navigation_main.png);
}
After that set the backgrouns positions specifically to each anchors, for the normal as well as hover states, like

#mainNav #navBio a{
background-position:-143px -2px;
}
#mainNav #navBio a:hover{
background-position:-143px -120px;
}
(..and for the other anchors too)

lmw1
05-18-2012, 11:41 AM
Hmm? It's still a little wacky. And I somehow lost the "Contact" button.

Any more ideas?

I appreciate your help!

Respectfully,
LMW1

abduraooft
05-18-2012, 12:22 PM
You need to remove the text-indent from the <li>s first and position the anchors in the desired locations (make sure that there's enough space among them to contain the width of the circle image). Then apply the sprites and adjust them to come well aligned with the text. Then finally bring the text-indent.

lmw1
05-18-2012, 11:16 PM
Your advice worked perfectly! Thank you sir!

Respectfully,
LMW1



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum