One of the most commonly asked questions I get about CSS is how to center things. It was really easy when we just used the deprecated <center> tag. But trying to do it with CSS can sometimes be very frustrating. That’s because CSS treats block-level elements differently from inline elements (except <img />, which is a block-level tag, but it centers like an inline tag). In my centering with CSS article, I teach you how to center anything on your page. I even show you how to center things vertically. And if that’s not enough, you can learn how to center a document with a fixed width layout and center a document with a liquid layout.
Monday September 6th 2010









