Closed Bug 441946 Opened 16 years ago Closed 16 years ago

font styles in nested lists do not render correctly

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: ritterml, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0

When styling for unordered lists nested within a parent list item I expect the settings for the nested item to override those of the parent, but they do not in FF3, works as expected (Gasp!) in IE7.

EXAMPLE:

UL
 LI
 LI
  UL
   LI
   LI
    UL
     LI
     LI
    /UL
   LI
  /UL
 LI
/UL

EXAMPLE CSS

ul li {font-weight:bold;}

ul li ul li {font-weight:normal}

ul li ul li ul li {font-style:italic}

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
Nested list inherits parent's attributes

Expected Results:  
Attributes for child list should override parent's attributes
Mike, could you attach a testcase that illustrates this problem, one that renders in FF3 and IE as you describe?
(In reply to comment #2)
> See  http://mikeritteronline.com/nestedlist.html

That construction is invalid html 4
The nested ul has to be included inside the li, like so:
..
<li> aaa </li>
<li> xxx
<ul>
<li>nested</li>
</ul></li>
<li>yyy</li>

And those closing </a> shouldn't be there, but that is unrelated to the issue.
Attached file valid example
based on http://mikeritteronline.com/nestedlist.html

valid example, works correctly in all browsers
My apologies for the bad code. Great work tracking it down Philippe.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: