Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tooltip missing in IE 8

1,041 views
Skip to first unread message

Andreas Prilop

unread,
Jul 21, 2011, 12:06:45 PM7/21/11
to
I write
<a title="..."><span>...</span></a>

Internet Explorer 8.0.7600.16385 does *not* show the tooltip
(i.e. title="...") for

• HTML 4 Transitional - Standards mode
http://www.user.uni-hannover.de/nhtcapri/temp-2.html

But IE 8 does show the tooltip for

• HTML 4 Strict - Standards mode
http://www.user.uni-hannover.de/nhtcapri/temp-1.html

• HTML 4 Transitional - Quirks mode
http://www.user.uni-hannover.de/nhtcapri/temp-3.html

Is there an explanation?

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/search?q=author:Alan.J.Flavell

Swifty

unread,
Jul 21, 2011, 12:12:57 PM7/21/11
to
On Thu, 21 Jul 2011 18:06:45 +0200, Andreas Prilop
<prilo...@trashmail.net> wrote:

>Is there an explanation?

I've seen IE fail to display tooltips when they were inside a form
that didn't specify an ACTION= value.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Arno Welzel

unread,
Jul 21, 2011, 12:23:59 PM7/21/11
to
Am 2011-07-21 18:06, schrieb Andreas Prilop:

> I write
> <a title="..."><span>...</span></a>
>
> Internet Explorer 8.0.7600.16385 does *not* show the tooltip
> (i.e. title="...") for
>
> • HTML 4 Transitional - Standards mode
> http://www.user.uni-hannover.de/nhtcapri/temp-2.html
>
> But IE 8 does show the tooltip for
>
> • HTML 4 Strict - Standards mode
> http://www.user.uni-hannover.de/nhtcapri/temp-1.html
>
> • HTML 4 Transitional - Quirks mode
> http://www.user.uni-hannover.de/nhtcapri/temp-3.html
>
> Is there an explanation?

I don't know why IE behaves like this (other browsers display the
tooltip) - but if you remove the span-Element, it works:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>HTML4 Trans. Standards mode</title>
</head>

<body>

<p>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"&gt;</p>

<h1><a title="This is the tooltip.">Read the tooltip!</a></h1>

</body>
</html>


--
http://arnowelzel.de
http://de-rec-fahrrad.de

David E. Ross

unread,
Jul 21, 2011, 1:10:29 PM7/21/11
to
On 7/21/11 9:06 AM, Andreas Prilop wrote:
> I write
> <a title="..."><span>...</span></a>
>
> Internet Explorer 8.0.7600.16385 does *not* show the tooltip
> (i.e. title="...") for
>
> • HTML 4 Transitional - Standards mode
> http://www.user.uni-hannover.de/nhtcapri/temp-2.html
>
> But IE 8 does show the tooltip for
>
> • HTML 4 Strict - Standards mode
> http://www.user.uni-hannover.de/nhtcapri/temp-1.html
>
> • HTML 4 Transitional - Quirks mode
> http://www.user.uni-hannover.de/nhtcapri/temp-3.html
>
> Is there an explanation?
>

Why not put the TITLE attribute in the SPAN tag?

In any case, the problem appears to be in IE, not in your markup. All
three examples show the tooltip with SeaMonkey and thus likely show it
in Firefox and any other Gecko-based browsers.

--

David E. Ross
<http://www.rossde.com/>.

Anyone who thinks government owns a monopoly on inefficient, obstructive
bureaucracy has obviously never worked for a large corporation.
© 1997 by David E. Ross

Andy

unread,
Jul 22, 2011, 4:01:55 AM7/22/11
to

"Andreas Prilop" <prilo...@trashmail.net> wrote in message
news:Pine.LNX.4.64.11...@zen.rrzn.uni-hannover.de...

Hi,

Just remove the <span> and style the <a> as needed.


Andy

Jonathan N. Little

unread,
Jul 29, 2011, 10:52:45 AM7/29/11
to
Andreas Prilop wrote:
> I write
> <a title="..."><span>...</span></a>
>
> Internet Explorer 8.0.7600.16385 does *not* show the tooltip
> (i.e. title="...") for
>
> � HTML 4 Transitional - Standards mode
> http://www.user.uni-hannover.de/nhtcapri/temp-2.html

IE9 doesn't either. The problem appears that you have the title
attribute on the ANCHOR element and not the SPAN.

<h1><a title="This is the tooltip."><span>Read the tooltip!</span></a></h1>

I suspect since the ANCHOR has no other content than the SPAN, IE the
SPAN hover overrides the ANCHOR in IE maybe?

<h1><a><span title="This is the tooltip.">Read the tooltip!</span></a></h1>


Anyway since the ANCHOR element has no HREF it appears not to be a link
but just a document anchor, I would refactor to reduce the unnecessary
elements:

<h1 id="myAnchor"><span title="This is the tooltip.">Read the
tooltip!</span></h1>

And the SPAN also contains all of the content so I would reduce further:

<h1 id="myAnchor" title="This is the tooltip.">Read the tooltip!</h1>

Which will now work in IE.

I would only put the SPAN within a H* if you had to isolate a portion of
the text for special treatment

h1 span {
display: block;
margin-left: 1.5em;
font-size: .8em;
font-style: italic;
}

<h1>A Page Heading <span>with some sub-text</span></h1>

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Andreas Prilop

unread,
Jul 29, 2011, 12:21:44 PM7/29/11
to
On Fri, 29 Jul 2011, Jonathan N. Little wrote:

>> Internet Explorer 8.0.7600.16385 does *not* show the tooltip

>> http://www.user.uni-hannover.de/nhtcapri/temp-2.html
>
> IE9 doesn't either. The problem appears that you have the title
> attribute on the ANCHOR element and not the SPAN.

The page is valid HTML and other browsers have no problem here.

> Anyway since the ANCHOR element has no HREF [...]

Do you understand what a "minimal example" is?

And I did not ask how to persuade Internet Explorer to show
the tooltip. (Hint: $NEWSGROUPS)

--
From the New World:
http://www.google.com/search?ie=ISO-8859-2&q=Dvofi%E1k

Jukka K. Korpela

unread,
Jul 29, 2011, 2:29:00 PM7/29/11
to
29.07.2011 17:52, Jonathan N. Little wrote:

> I suspect since the ANCHOR has no other content than the SPAN, IE the
> SPAN hover overrides the ANCHOR in IE maybe?

This is a mysterious bug, as it indeed seems to disappear if you add
content other than the SPAN element, at least on IE 9.

On IE 9, using the DOM inspecting feature (PF12), the demo with A
contains just a SPAN shows a correct DOM tree,

> Anyway since the ANCHOR element has no HREF it appears not to be a link
> but just a document anchor,

Adding an HREF attribute does not make the bug go away.

Reducing the problem by removing the H1 markup around the A element has
no effect on the bug either.

> I would refactor to reduce the unnecessary elements:

It is true that an A element with a SPAN element as its sole content is
somewhat odd, but there's no reason why it should be treated this way.
Though such a construct might be rare in hand-woven HTML, various
authoring tools and converters may generate it.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Andreas Prilop

unread,
Jul 30, 2011, 10:56:40 AM7/30/11
to
On Fri, 29 Jul 2011, Jukka K. Korpela wrote:

|| http://www.user.uni-hannover.de/nhtcapri/temp-2.html


>
> This is a mysterious bug, as it indeed seems to disappear if
> you add content other than the SPAN element, at least on IE 9.

| [...]


> Reducing the problem by removing the H1 markup around the
> A element has no effect on the bug either.

The strangest thing is that Internet Explorer does show
the tooltip (title attribute) on
http://www.user.uni-hannover.de/nhtcapri/temp-1.html
http://www.user.uni-hannover.de/nhtcapri/temp-3.html

Therefore it is not just "standards vs. quirks mode".

0 new messages