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 2 of 2
  1. #1
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Moz has problems with resizing

    Code:
    function resizethings() {
      document.getElementById('e').style.height = 
        String(getwindowsize(true) - 
        document.getElementById('top').offsetHeight -
        document.getElementById('head').offsetHeight) + 'px';
    
      if (getwindowsize(false) > 400)  {
        document.getElementById('main').style.width = '65%'; 
        alterlefts(false);
      } else {
        document.getElementById('main').style.width = '400px'; 
        alterlefts(true);
      }
    }
    That's the code that's called onload and onresize in my page. Basically, it's the second bit that matters, because Moz isn't displaying this properly - it's always displaying my main div at 100% rather than normally 65%.

    This is my only script, so there's no element of event handling clashes.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    try using direct math operators, I mean, use something like width*65/100 instead of 65%....
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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