The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Keep page centered Re: Keep page centered


All it needs is for the content to be wrapped in an element (usually a div) and it will have a set width and for the margin to be set to auto.

These divs are usually called wrappers or containers.

Here’s an example…in this case, because I wanted multiple sections, I use a class called `inner`…it works the same.