This script center image from the size of the parent node, not viewport. And accord to standarts, <body> height is not equal to viewport height. To center image to viewport author should made <body> height equal to vieport by adding: style="height: 100%" to <html> and <body> tag. Look at Bug 115421 to know about viewport and body height more.
OK, I learned something new. Setting the style="height: 100%;" for both the body and html elements works. The only problem i see now is that the w3c validator tells me that style is not a valid attribute of HTML. Looking through the DTD it appears they are right.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.