or maybe you could pass the value of $child.sequence as a parameter to the child's line template (and use it there to add a class to some existing div) to avoid cluttering your html with further markup.
hope it helps
I have great faith in fools; self-confidence my friends call it.