Open Masimakinova opened 1 year ago
Hi, If you want to select every -last-child remove the ".small" from your request so : :last-child ==> selects small apple in fancy plate, large last orange in the plate and small last pickle.
@Masimakinova - I thought the same and wondering why is it acceptable.
@Masimakinova @Sanjincs Hello, I got stuck reasoning about this answer too, but trying other selectors helped me understand why this works the way it does.
The .small:last-child
selector doesn't pick the small orange because the small orange is not the last-child of the parent plate tag. The large orange is the last-child.
You can see this if you choose plate orange:last-child
as your selector: the large orange vibrates, not the small orange.
You can also see this if you enter .small:first-child
so both the small orange and the small apple are selected, but the small pickle is not selected because while it has class=small, it is the last element of the table, not the first.
Hi! I resolved task number 17 but I don't understand how it worked. Why it didn't picke small orange ? I wrote this: " .small:last child "