add css counter and detail element