View Full Version : onresize and w3c compliance
wkenny
09-22-2005, 11:03 PM
I use the DocCenter() function to centre page in different screen resolutions like so
<body class="global" onresize="DocCenter()">
W3c's HTML validator says
there is no attribute "ONRESIZE".
Is there a compliant way to achieve the same thing?
Cheers
Billy
jscheuer1
09-23-2005, 02:14 AM
Probably. You could use an external script with:
window.onresize=DocCenter;in it. Or use that event setting inside a commented script area on the page:
<script type="text/javascript">
<!--
window.onresize=DocCenter;
//-->
</script>
wkenny
09-23-2005, 02:31 AM
Thanks John. As always, your help is much appreciated.
Cheers
Billy
mwinter
09-25-2005, 09:34 PM
Or use that event setting inside a commented script area on the page:John, please don't revive that junk. Script elements should not contain SGML comments. Ever.
Mike
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.