[thelist] CSS - sliding doors method and image flicker problem in IE

Dave Stevens itsallaboutashlee at yahoo.co.uk
Wed Nov 30 19:11:15 CST 2005


Tom Dell'Aringa wrote:

>Hi there,
>
>I'm using a sliding doors method for some rollovers. Works in all browsers, but IE has an awful
>time with the rollover, I get a the flash of the background color, then the image load every
>single time. Looks like garbage.
>  
>
Hi Tom,

I've experienced the same problem, I recently found an article[1] with a 
technique whereby the link is placed inside another element such as a 
span or div, with that element having the "hover" image as it's 
background. Then the link itself has the non-active image as it's 
background, and the a:hover has background: transparent; so there's no 
flicker. I've yet to get round to trying it myself but the theory seems 
sound.

Also, while googling to find the article I mention here, I found this on 
a forum[2]:
"A better way to prevent flickering in IE is:

a { background: transparent url(img_hover.gif) no-repeat top left; }
a:link, a:visited { background: transparent url(img_default.gif) 
no-repeat top left; }
a:hover { background: transparent url(/img_hover.gif) no-repeat top 
left; } "

Cheers
Dave

[1]
http://www.wellstyled.com/css-nopreload-rollovers.html
(note the link to example 2 at the bottom of the page)

[2]
http://www.csscreator.com/css-forum/ftopic14244.html


		
___________________________________________________________ 
Yahoo! Model Search 2005 - Find the next catwalk superstars - http://uk.news.yahoo.com/hot/model-search/



More information about the thelist mailing list