A Simple CSS selector problem

I am trying to enter this code working with CSS 'nth-child' selector but it seems to be not working. What might be the solution to this? The same problem exist if i use the 'last-child' selector. Nothing seems to work...
1 Reply
ABK | Muneer
ABK | Muneer3y ago
.test a:nth-of-type(2) will work nth-child is gonna select the child of the main container so by doing :nth-child(2) you're selecting a <br> not the link to test this try .test > a:nth-child(4) and it should work fine your code right now is basically like <a> <br> <br> <a> so if you want to pic the 2nd link you need to choose the 4th child or by using :nth-of-type you're only selecting the <a> in that way
Want results from more Discord servers?
Add your server