:not(:last-fieldset) question

Hi,

Maybe someone can help…I just can’t seem to get this to work and I’m a little stuck. I’m currently working through “Building a Registration Form” in Responsive Web Design

Step 41

To give the fieldset elements a bit of separation, select all but the last fieldset element, and give them a border-bottom of 3px solid #3b3b4f .

this is what I have…

fieldset:not(:last-fieldset) {
border-bottom: 3px solid #3b3b4f;
}

I can’t seem to get it figured out. Any advice on how to move forward? Am I close?

Thanks so much!

:last-of-type is the literal name of the pseudo-class selector. You should not replace the of-type part with an element type.

3 Likes

Oh wow. Thank you so much! That makes complete sense.

I still don’t get it :confused:

Hi @b4c1c !

Welcome to the forum!

If you need help with a lesson, please create a new post with your code and challenge link and people would be happy to help you there.

Thanks! :slight_smile:

1 Like

Thank you! :slight_smile:
I didn’t want to spam forum opening new post for the exactly same question, on the same “Step 41”.
I did find an answer in when RWD was in beta, dated 2021.
I still don’t get a concept. I probably need a break :slight_smile:

replace this line of code → fieldset:not(:last-fieldset)

Mod edit: solution removed

@mummaquincy It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

Thanks for answering. That helped me too.

So i had trouble with this one as well… But mainly it is b/c i don’t remember coming across this way of doing the specific style in discussion through the course… Does anyone remember a lesson number that they went through this… or was this one of those “look it up MDN” moments lol

You can select the last element of a particular type using
xxx:last-of-type{yyy}
‘xxx’ is its parent’s last child of a given type and ‘yyy’ is the property to be changed