Bug Tracker

Opened 12 years ago

Closed 12 years ago

#3633 closed bug (invalid)

nth-child unexpectedly counts a div as a child.

Reported by: dottedt Owned by:
Priority: major Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: Cc: dottedt
Blocked by: Blocking:

Description

When counting the childrenof an ol/ul the nth-child selector will count a div if a div is the child of the ol/ul, not the first child, and previous sibling is a li. This appears to only happen when counting li's such as li:nth-child(4n+1). The number is not relevant.

Attachments (1)

test-case.html (2.6 KB) - added by dottedt 12 years ago.
test case

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by dottedt

Attachment: test-case.html added

test case

comment:1 Changed 12 years ago by flesler

Cc: dottedt added
Resolution: invalid
Status: newclosed

Divs cannot be children of ol/ul's. Only li's. That's invalid HTML.

Note: See TracTickets for help on using tickets.