[BNM] CSS rollover image links

Barry Bloye bbloye at gmail.com
Thu Mar 8 08:47:28 GMT 2007


On 07/03/07, robert stevens wrote:
> I'm having to create a navigation using images of different widths on the
> page and for each there will be a 'hover' image too.

[...]

> Can I pre-load the hover state image without using JavaScript?
>
> If not, should I turn the image into one image, and set up the CSS to reveal
> the 'hover' part of that image on rollover?
>
> Or, is there a reliable CSS way to preload an image? such as:
> <img src="myimage.jpg" style="display: none">
>
> The simplest, most robust and compliant method for this much desired.

I recommend giving this a read:
http://www.alistapart.com/articles/slidingdoors/

Combining the images for normal/hover states means that the hover
images are loaded when the page loads and you don't get the flicker.

hth,
Baz



More information about the BNMlist mailing list. Powered by Wessex Networks