Here’s a handy tip from Jeffrey Zeldman, prompted by a question asked at the “CSS: Between the (Style) Sheets” panel that he co-hosted at SXSW: how to preload hover states in CSS rollovers.
This is just what I needed to add the finishing touch to my recent XHTML/CSS conversion of Lost In Translation.
I was really happy with the way that I had the site navigation links looking but the CSS rollovers were causing an annoying flicker in Internet Explorer 5+ on Windows. References to images in a stylesheet evidently don’t get cached by the browser.
Now, thanks to Jeffrey’s tip and the addition of one extra line to my stylesheet, that problem is solved.
Want some more real-world CSS tips’n’tricks? Check out Doug Bowman’s great article “Using Background-Image to Replace Text”.