Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resizing to a specified inner width

    Hi

    I have a document that I'd like to do the following with, can anyone help?

    I'd like the window to resize onload to an innerwidth/height of 783px by 434px, so that all browsers will display the same screen space

    The content inside is larger than that and I want people to scroll if they have their browser window open larger (sounds strange I know!).

    I have used a standard - onLoad="resizeTo(783,434) - but it looks incorrect on netscape etc.

    Any ideas?

    Thanks

  • #2
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    maybe something like: window.onresize = function(){resizeTo(783,434);}
    hmm... ?

  • #3
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    You could resize to a certain size, calculate the difference compared to the inner size, and resize again based on the results of that resize.

    However, I believe a better choice would be wrapping the body in another element, to which you set those size limits, and let the user scroll that element instead.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

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