Home › Forums › CSS › First- and last-of-type pseudo selectors. › Reply To: First- and last-of-type pseudo selectors.
July 27, 2017 at 6:35 am
#257124
gulliver
Participant
@ Paulie_D… thanks.
My css knowledge is relatively little, and so I’ll learn more about your suggestion… and certainly avoid using ‘nth-of-x’.
Currently, if I’ve understood, I don’t see a way to do what I’d originally hoped to do… confine the style to an element within a specific div (in this case: the last p in ‘div class=”example”), and not have other divs also affected.
UPDATE: I think I may still be misunderstanding this… a simple Codepen test (https://codepen.io/glvr/pen/RZPzME) suggests desired behavior can be targeted and confined to a specific div.