When you have two blocks floated left and right, this method can fill the space between them when you do not know their widths in advance.
No-Library (pure JS), HTML, CSS, JavaScript
Center a div both horizontally and vertically.