Center an element in the unknown using javascript.