Pseudo-class selectors and nth-child selectors


I'm confused, have I written the code wrong?

This part of the CSS and HTML course says that it "Would make all paragraphs that are the first children of their parent elements red."
or in the case of the nth-child "Would turn every paragraph that is the second child of t it's parent element red."
This doesn't seem to work, take a look at my CSS and HTML and see if I've done something wrong?

But the end result is that only the first of the first parent in the html is effected?



Please show me your css above is only HTML


You don't even have 5 paragraphs, reset the exercise, it is not recommend to temper with the html code in this exercise


I just realized your correct I'm targeting p tag and expecting it to effect li
OOPS! :slightly_smiling:


Thanks, it was a good learning process :slightly_smiling:


I like to hack my education a bit with the lessons and have a play with the code as I go. I'll build thing in to each lesson that I have learnt in past lessons so I don't forget them and so I can see how it is effected by what I am doing.
It's not caused any problems yet and it makes the lessons a bit more in depth and fun.
Plus I write every new element down that I've learnt so I can reference them if I get stuck, doing this helps me because It forces me to cognitively go thought the process of what I'm doing, thus reinforcing my lessons.
I really like, thanks to everyone who's made this infrastructure of learning possible :slightly_smiling:


Yeah I did the same when I was learning HTML & CSS, even when leaning any other languages I write down its really good.. Helps you remember as well..

Great pic :green_heart:

I made my own books which I jot down notes :slightly_smiling: (I would change which languages I paired up as now they don't make sense, I did this when I just started)


That's really good, I think I'm going to start ring binding them. How did you make your books :slightly_smiling:


I normal plain book I bought and printed the logo's onto a page (I printed black and white and colored in you can print color copy) and I stuck it on the cover.. Simple :smile:
All the contents is written btw not v neat .. I use highlighters for headings, sub and also if I jot down code I sometimes add in the syntax highlighting(depends if I'm feeling creative)


Sweet, looks great!
I was thinking about tabling up sections and sticking them in a ring binder because I have a feeling this might start to become quite a big wad of paper, especially since I've only written on one side of the paper.
Yeah, I love using highlighter.
I looked back at the first few pages I did without and just got lost in all the words.
Highlighters help alot :slightly_smiling:


Please continue this discussion in private chat or something :slightly_smiling: This topic has been resolved