Centered span with JavaScript instead of CSS