I'm having trouble understanding how the nth-child and first-child works. For example:
<body> <h3 class="elegante">Inicio</h3> <p class="elegante">Este es el inicio de la pagina.</p> <p id="serio">Este es el segundo parrafo.</p> <p>Este es el tercer parrafo.</p> </body>
I understood that if I put in my CSS p:nth-child(3), it should grab the 3rd p, but it doesn't; the only way it works is if I write p:nth-child(4). I also understood that if I write body:nth-child(4), it should change the 3rd p which is the 4th child of the body, but it doesn't (in fact, if I write "body" with any 'child' pseudoclass, it doesn't work). Could you please explain?