boughtonp used Ask the Experts™
Just a quick note, I've set the question to ten points, but I will increase this if I get a good answer.

Is it just me, or does the ALT attribute of the IMG tag over-rides the TITLE attribute of the A tag in IE.
Thing is, I thought the ALT attribute was supposed to be a description of the image, for those that have them disabled, whilst the TITLE attribute is for describing links.
To put it another way, if someone is surfing with images disabled I want them to see the word "INTRO" where the button would be, but on hovering they get "The main start and news page." - which is fine in Opera, but IE displays the ALT tag always, and Mozilla wont let me switch images off to test it.
I know it's a minor thing, and if it comes to it I'll just stick the link descriptions in the ALT attribute instead, but it would be nice if there was an easy solution.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
When you mouseover an image inside a link the event hits the image and does not bubble to the link.

The result is the browser acts as if you were hovering over the image but not over the link.

IE is broken[1] in that it displays the alt text as a tool tip. The work around is to duplicate the title attribute of the link on the image.

<a href="foo" title="Chap 2: Foo">
<img src="foo.png" alt="Foo" title="Chap 2: Foo">

[1] This is debatable - please noone start debating this now!


Ah, of course! I feel such a fool now... that solution is simple.

I think I'll go bang my head against a wall for a little while. :)

Even the brightest sparks can miss the obvious once in a while :)

Thanks for the A.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial