Lately the same question keeps rising on several web communities: how can I center my page using valid XHTML and CSS? I can't use the
<center>
tag nor the align
attribute, because both will give an error when validating.
To easliy answer the question - and not to get annoyed by having to give the same response several times - I set up an example at sken.be/css/center/
The example uses a container that wraps around the rest of the site. The left and right margins of the container are set to auto
using CSS.