Closed
Bug 200091
Opened 23 years ago
Closed 23 years ago
Hyperlinked transparent PNG or GIF has spurious strikethrough
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: ndm, Unassigned)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030331
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030331
Starting with the 1.3 release, transparent PNGs sometimes have strikethroughs
(an extension of the hyperlink underline) when they are hyperlinked. It happens
with ALIGN=MIDDLE but not with ALIGN=LEFT. This did not happen in 1.2.1.
In addition, the hyperlink underline of the text is sometimes offset too much;
again this did not happen in 1.2.1.
The attached HTML test case demonstrates this behavior.
Note: if the DOCTYPE declaration is removed (quirks mode), this behavior
goes away.
Reproducible: Always
Steps to Reproduce:
1. Look at the attached test case.
Actual Results:
There is one good example and 3 bad ones in the test case.
Each is accompanied by a remark describing the problem.
Expected Results:
The images should not have strikethroughs. To see what I believe should
be the "correct" behavior, open in Mozilla 1.2.1, or take out the DOCTYPE
declaration from the test case, or view the test case in (shudder) IE.
| Reporter | ||
Comment 1•23 years ago
|
||
| Reporter | ||
Comment 2•23 years ago
|
||
Comment 3•23 years ago
|
||
It looks to me that mozilla is indeed doing the proper thing here. Put a border
on your A tags and you'll see what the line box looks like:
<a HREF="http://electrons.net/" style="border:1px black solid;">
In these cases, in strict mode, the underline is on the A element. Its not on
the IMG element nor is it on the FONT element. Because of this when the IMG is
not pulled out of the normal flow of the document it sits in the normal line box
as would any other element. When you set align=left you're pulling it out of the
normal flow of the layout and out from between the A where the underline lives.
This is one of those differences between strict mode (~how the recs say it
should be) and quirks mode (~how people have come to expect things to be).
Solutions include (but not limited to) using a doctype that doesn't trigger
quirks mode, plaing the underline on another element, markign up the image as a
separate link from the the text content...
-> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Comment 4•23 years ago
|
||
This looks good in Quirks mode (as mentioned)
| Reporter | ||
Comment 5•23 years ago
|
||
Chris, I am grateful for your explanation, and I will accept that the
behavior is correct. However I tried and was unable to find the
specific rec that says this should be the behavior in strict mode. If
it is not too much to ask, could you point me to it?
Comment 6•23 years ago
|
||
Not that it has anything to do with Mozilla, but IE and Opera 7 do not show the
striking in strict mode.
Comment 7•23 years ago
|
||
Re: Comment 5: I'm sorry I don't have a specific reference for you. Its mostly a
combination of the line-height definition, and the text decoration definition
which states "This property is not inherited, but descendant boxes of a block
box should be formatted with the same decoration (e.g., they should all be
underlined). The color of decorations should remain the same even if descendant
elements have different 'color' values.". For anecdotal evidence (because they
are just a draft) see the css2 testsuite...
http://www.meyerweb.com/eric/css/tests/css2/sec10-08b.htm
http://www.meyerweb.com/eric/css/tests/css2/sec16-03-01.htm
Re: Comment 6: Yeah, I don't think that matters much, and for the record Safari
0.64 shows the underline behind the image just a mozilla does.
You need to log in
before you can comment on or make changes to this bug.
Description
•