Edit & Run
In this example, we use positioning and the transform property to vertically and horizontally center the div element:
I am vertically and horizontally centered.
Note: The transform property is not supported in IE8 and earlier versions.