Kevin Powell - CommunityKP-C
Kevin Powell - Community15mo ago
17 replies
snxxwyy

quick css questions

Hey, i just a few quick questions

1) is there a way to select an element based off of whether it's a certain count of one on the page? I know nth-child and nth-of-type do this, but only if the elements are siblings. If i wanted to select the 3rd p element on the whole page for example, would that be possible? maybe it's with that of selector that's floating around?

2) I've noticed that if you have a list inside of another list, the child's ul/ol element will have it's user agent margin removed, what causes this? is it because of the way sub-lists work? https://codepen.io/deerCabin/pen/wvVRoVG

Thanks in advance.
Was this page helpful?