Give #counter a large width so it doesn't collapse into itself.