how to use nth child with :after in css code example Example: child css p:nth-child(2) { background: red; }