« Managing Legacy Emails | Main | Finding Keyword Niches »
February 11, 2005
Simple sprites in xHTML/CSS
A website I'm working to develop uses CSS sprites to drive the navigational buttons. They were extremely simple to implement and consistent across all browsers. They provide other capabilities as well.
Generally, adhereing to strict standards-compliance principles when building sites these days takes time and testing. And a lot of it. I'm constantly seeking ways to refine and reduce the effort in getting something to look good quickly.
I've known about sprites for awhile, but never needed to use them. But the site's interface came from an outside deisgner, and I was committed to implementing in using standards.
To deal with the main navigation, I decided to rely on sprites to drive the interactivity. In essence, a sprite is a box - a hollow box of sorts - that is used as a template to show things in. With CSS, simple manuevers allow you to alter the content of what's in the box (its position, for example) in response to user behavior. The box can hold an image that is much larger than its opening.
What used to take either tons of slicing and messy javascript can now be accomplished very cleanly.
Posted by pgraber at February 11, 2005 10:09 AM
