CSS selectors like :nth-of-type(x) on a section
CSS selector :nth-of-type(x)
applied to a section don't work, the selector is applied to the page.
For example, if you want to select the 3rd paragraph of the section with p:nth-of-type(3)
, the 3rd paragraph of each page in which the section is located will be selected.
With the code section p:nth-of-type(3) { color:blue; }
, here what happens :
With the correct way, that's what should have happened:
It's the same problem with other CSS selectors :
:first-of-type
:last-of-type
:nth-child(x)
:nth-last-child(x)
:first-child
:last-child
CSS selectors specifications : https://drafts.csswg.org/selectors-4/
Source file: issue-13-problem.zip