With Transitional DOCTYPE, Cannot Turn Off Link Underline for Image

VERIFIED INVALID

Status

()

Core
Layout
VERIFIED INVALID
15 years ago
15 years ago

People

(Reporter: David E. Ross, Unassigned)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113

To validate my Web pages, I began adding DOCTYPE declarations for HTML 4.01
transitional.  On some pages where I did this, I have both text and images
within a link anchor.  Previously, the link underline only applied to the text.
 But with the addition of DOCTYPE, the underline now also applies to the image.  

I have tried various style sheet ways to suppress the underline.  For example: 
   a:link img, a:visited img { text-decoration: none }
None of these help.  

Reproducible: Always
Steps to Reproduce:
View the cited URL.  
Actual Results:  
In three different presentations, the link underline appears for both the image
and the text.  

Expected Results:  
There should be a way to suppress the underline.
the <img> is a child of the <a>, the <a> has a text-decoration of underline on
its entire contents. the <img> has a text-decoration of none anyway. quoting CSS
2.1 16.3.1:
"Text decorations on inline boxes are drawn across the entire element, going
across any descendant elements without paying any attention to their presence.
The 'text-decoration' property on descendant elements cannot have any effect on
the decoration of the element"
(http://www.w3.org/TR/CSS21/text.html#q3)

this bug is invalid.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
Yep.  If the <a> has text in it, all children of the <a> get underlined, per the
CSS spec.  Without a doctype we do non-spec-compliant "quirks" underline
rendering that's closer to what authors sorta expect.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.