Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

anchor hover - computer needs to think about it

Status
Not open for further replies.

cLFlaVA

Programmer
Jun 14, 2004
6,450
US
hey peoples.

i have set up a temporary page for this question:
if you hover over the links on the left, you might see the mouse turn into the hourglass for a split second (only in IE of course, this doesn't happen in FF). this is driving me insane.

can anyone determine why this is occuring? is it trying to re-download the bullet picture for each mouse state, and, if so, why?

thanks!

Cory



*cLFlaVA
----------------------------
[tt]I already made like infinity of those at scout camp...[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
It's probably because you have your IE cache settings set to "Every visit to the page", and have a background image on the anchor which effectively changes on hover (to itself). If you change the cache settings to "Never", you might find it goes away.

Out-of-the-box, IE uses "Automatic" (from memory), which AFAIK, doesn't exhibit this behaviour... so I'd live with it, as it's best for developers (IMHO), and live with the knowledge that unless people have tweaked their cache settings, they won't see it.

These are just my observations, btw - I've never seen this referred to anywhere.

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I'm *guessing* it's because you've specified a background for each of the a: states:
Code:
#left-col ul li a:link, #left-col ul li a:visited, #left-col ul li a:hover, #left-col ul li a:active  {
    background: transparent url(../pix/sidenav_bullet_closed.gif) no-repeat 0 .3em;
I'm guessing that IE is failing to recognise that the same image is used for each state, and so is attempting to load a new image for every state change.

As you're using the same code for every state, the solution may be to remove the pseudoclasses:
Code:
[COLOR=red]#left-col ul li a {[/color]
    background: transparent url(../pix/sidenav_bullet_closed.gif) no-repeat 0 .3em;

I'm not certain that Dan's comments apply in this case; IIRC the IE setting controls how the page (i.e. the HTML) is cached, not the page assets.

Now you've mentioned it, I checked another web site which uses :hover to display a bullet against the menu choice you're hovering over (it really is a state change for this site: there's no bullet when you're not hovering) and it too suffers the millisecond hourglass.

As another alternative (if you are using different images for different states), you could use a hidden foreground image, made visible by javascript.

---
Marcus
better questions get better answers - faq581-3339
accessible web design - zioncore.com
 
something different...
If you have Google toolbar installed with your IE try closing it for a while and hover on the links.

Google toolbar looking for Maps!!

________________________________________________________
Zameer Abdulla
Help to find Missing people
All cats love fish but fear to wet their paws..
 
I have seen this before, it is a pain. Basically manarth hit it on the head with the image reloads. When someone I know had a similar problem he tried all kinds of image preloading, etc. None of it worked well and he eventually stepped back and attacked from a differant angle completely.
Another option (if you were really changing the image) would be to use an image that had both pictures in it and movethe location of the background image for each state (basic sprites). If you want more info on that, as it is fun to implement :p, check out AListApart in the CSS section.

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top