Reputation: 1511
Can someone please translate the following CSS to plain English for me.
#menu ul li:first-child > a:after
Upvotes: 1
Views: 128
Reputation: 371221
#menu ul li:first-child > a:after
means:
Target the :after
pseudo-element (technically, ::after
)...
which is associated with an anchor element (a
)...
that is a child of a list item (li
)...
which is first on the list among siblings (:first-child
).
The li
must be a descendant (but not necessarily a child) of an unordered list (ul
)...
which itself is a descendant of an element with the id
value of menu
.
Upvotes: 1
Reputation: 7324
#menu ul li:first-child > a:after
Select :after
pseudo element inside a
element, the a
element should be the direct child of li
and the li
should be the first child of any ul
inside any element which have #menu
id
Upvotes: 1
Reputation: 51451
Apply the defined styles to the :after
pseudo element of all a
elements that are children of the first li
element inside of all ul
elements that are inside an element with id menu
.
Or
Selects any content placed after an a element that is a child of a li element that is a first child that is a descendant of an ul element that is a descendant of any element with an id attribute that equals menu.
via SelectOracle
Upvotes: 1