CSS :nth-child() Generator

Type a sequence of numbers below, and the tool will reverse-engineer the required CSS pattern!

The algorithm automatically figures out the cyclic jumps and generates the shortest selectors.

Pro Tip: Alternatively, if you ever find yourself in a situation where you can't remove other sibling tags like scripts or spans, you can use :nth-of-type(...) instead, which strictly counts only elements of the same tag name!

Live Visualizer Preview