Results 1 to 4 of 4

Thread: onresize and w3c compliance

  1. #1
    Join Date
    Jul 2005
    Posts
    101
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default onresize and w3c compliance

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Probably. You could use an external script with:
    Code:
    window.onresize=DocCenter;
    in it. Or use that event setting inside a commented script area on the page:
    HTML Code:
    <script type="text/javascript">
    <!--
    window.onresize=DocCenter;
    //-->
    </script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2005
    Posts
    101
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Thanks John. As always, your help is much appreciated.
    Cheers
    Billy

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •