Reputation: 7050
Currently, I have this selector:
.form .mid td p:last-child:not(:only-child) {
margin-bottom: 0;
}
It's not working as intended. I want to remove the margin ONLY if there are more than one P
inside the TD
Upvotes: 13
Views: 17698
Reputation: 723739
If your td
contains more than just p
elements (I can't tell because you haven't shown your markup), you probably want to use :last-of-type
and :only-of-type
instead:
.form .mid td p:last-of-type:not(:only-of-type) {
margin-bottom: 0;
}
Upvotes: 21