div positioning and rank incrementing working correctly