How to use pseudo-class :not(:last-of-type)

Hi there,
I am stuck at step 41 in the module, Building a Registration Form.
I cannot come up with the correct solution and the hint I get I don’t understand how to use it:
You can use the :not(:last-of-type) pseudo-class to select all but the last element.
Can anyone give me some more hints on how to solve this problem?

The way I thought about it (and hope it helps)
So I figured I would start out with fieldset{ } and just see if I could get the bottom border on all of them with the color, etc.
Once I got that working I got the error talking about the :not(:last-of-type). I remembered when we did some work with the anchor (a) tag where we did things like a:hover, a:visited. So I deducted (guessed moreso? lol) that with the :not having the colon, I figured that would be attached to the element and tried that.

I hope that helps and gives some hints:)


Many thanks, Rebecca. Could figure it out :slight_smile:

1 Like

Thank you so much for that, I was racking my brain on this one. Good stuff!

if you want to sharpen your CSS skills with with pseudo-classes check out CSS-Diner it’s an awesome site, and if it get’s too hard then plenty of people have posted the answers online. It helps you understand the way classes, id’s, and psuedo-selectors work