Centering in the Unknown | CSS-Tricks
Extracted Page: http://css-tricks.com/14745-centering-in-the-unknown/Centering in the Unknown | CSS-Tricks
When it comes to centering things in web design, the more information you have about the element being centered and its parent element, the easier it is. So what if you don't know anything? It's still kinda doable.
Not too hard: Known Child
If you know the height and width of both the element to be centered and its parent element (and those measurements won't change, i.e. not fluid width environment) one foolproof way to center the element is just to absolute position it with pixel values so it looks perfectly centered.
Let's say you know the ex
Additional text has been truncated due to copyright reasons. Things without URLs and private things don't get truncated.