HTML Validation Difficult

What change was made that relates to the centering? Do you have the code for the centered version?

What would be an example of that? I’m not sure what you mean. Isn’t the default width 100%? I can’t think of a situation where margin: auto centers an element without a set width.

Without a width set on the OP’s site, the content will sit left, won’t it?

I think the original code used <center>

No, the default width is auto, which is based on the internal content itself.

See: Computing widths and margins

Ah yes, of course. Silly me. BUT… with no margin, padding, border values set, that auto width will fill the browser window, so the container won’t center unless a width is set on it. I haven’t seen a container set its width on the basis of its contents… unless maybe it’s floated.

I find that the best examples are where the container holds other elements that each have discrete widths of their own.

But this is getting away from the OP.

What change do you think that the validation requested, which affected the centering of the OP’s page?

Hmm, still not convinced this will make the container center itself, though.

What change do you think that the validation requested, which affected the centering of the OP’s page?

Good question. I’m not sure, although it might have been a warning that <center> is better not used with XHTML?

BTW @ Another Designer
Part of your DOCTYPE seems to be missing (at the top of the page).

I found it. It had a wrong class looking for CSS that did not exist. Once I deleted the CSS tag it centered. :slight_smile: