The inline content is centered; it's centered relative to its left and right sides, which depend on the parent element. By setting a width on <body>, you've restricted the left and right sides of its descendants. If you center the body (e.g. by setting margin to "auto" for modern browsers), everything centered within <body> will be appear centered relative to the viewport.