mozilla ignores text-decoration inside a link.

VERIFIED INVALID

Status

()

Core
CSS Parsing and Computation
P3
normal
VERIFIED INVALID
17 years ago
17 years ago

People

(Reporter: Martin Horwath, Assigned: Pierre Saslawsky)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
if i have a html construct like this

<a href="#"><b style="text-decoration:none">any link</b></a>

mozilla will always underline "any link", this might be dup, but i could not
find it in mozilla.

ie4x and opera4 display it with no underline.

Tested with Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001104.
(Reporter)

Comment 1

17 years ago
Created attachment 18757 [details]
testcase
ie4x and opera4 are wrong.  From http://www.w3.org/TR/REC-CSS1#text-decoration:

This property is not inherited, but elements should match their parent. E.g., if
an element is underlined, the line should span the child elements. The color of
the underlining will remain the same even if descendant elements have different
'color' values.

Therefore, all children of an <a> element that is underlined should be underlined.

To get the behavior you want, set the text-decoration property on the <a>
element itself:

<a href="#" style="text-decoration:none"><b>any link</b></a>
(Reporter)

Comment 3

17 years ago
all you wrote is correct, but the spec is not 100% clear in this case.

the reason why i posted this report was, i checked my hotmail account, and 
there are a lot of this html constructs on that page. (... and the page looked 
like s**t)
Please see the comments on bug 52767, bug 27245, and bug 11377

They all talk about the problem, some in a bit more depth.  It seems that CSS2
specifies things a little more clearly at
http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-decoration.

Based on those, this bug is invalid, and you may want to contact Hotmail and
tell them that their CSS is broken....
(Reporter)

Comment 5

17 years ago
thx for the last comment boris...
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID
Netscape's standard compliance QA team reorganised itself once again, so taking 
remaining non-tables style bugs. Sorry about the spam. I tried to get this done 
directly at the database level, but apparently that is "not easy because of the 
shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
(Reporter)

Comment 7

17 years ago
*** Bug 70896 has been marked as a duplicate of this bug. ***
VERIFIED INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.