Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

ie lag

ie lags when using css background

7:05 pm on Mar 28, 2004 (gmt 0)

Full Member

10+ Year Member

joined:May 9, 2002
votes: 0

function change1(){
document.getElementById("test").style.background = "url(images/1.jpg) #fff left no-repeat";
function change2(){
document.getElementById("test").style.background = "url(images/2.jpg) #fff left no-repeat";
end so on ....

<a href="Link 1" onmouseover="change1();" class="l2">
etc ....
<div id="test">&nbsp;</div>

when the cursor is hover on the link, a pic would appear in the div#test as a background (size is almost 600 by 200), the problem is with msie where in it lags, and appears to download or recheck the image again instead having the hover to change instantly like in mozilla.

is there a way to accomplish and remove the lag in msie?


8:13 pm on Mar 28, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 15, 2004
votes: 0

Not as far as I know, MSIE doesn't cache background images, it has to get them from the server each time, that's annoying but no real way around it that I know off.

There is a supposed fix for this using CSS alone, involving having only one background image, and changing its position on hover. But that doesn't work at all on older PC's running MSIE, the result is far worse than your current problem, they call it the 'flickering problem', but it's actually 'total display failure problem', if you test on a slow old pc and you'll see the problem right away, which unfortunately people don't do before putting that out as a solution.