Monday, May 2, 2011

Horizontally And Vertically Centering Div with CSS

While building web page layouts, you’ve probably been faced with a situation where you need to center a div both horizontally and vertically with pure CSS. There are more than a few ways to achieve this, and in this article we are going to show you our favorite involving CSS and jQuery.

But first, the basics:
Horizontal centering with CSS

margin:0 auto;

Continue this article

No comments: