dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Question on function window.onresize (need your help guys!)

  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Question on function window.onresize (need your help guys!)

    is it possible to resize a div on function window resize?

    i was thinking to base it on windows browser size if 1024 would be 15 px (div width) and
    and a bigger resolution like 1900 would be 3px. i really need your help guys!

    http://oopweb.com/JavaScript/Documen...t11/resize.htm


    Thanks!!
    Last edited by Julia25; 07-13-2009 at 09:02 AM.

  2. #2
    Join Date
    Jul 2009
    Posts
    2
    just wondering how to edit my post seem i cant find edit button,
    to be specific
    the div will resize by increments just dont know how much but
    like1024 is 15px the 1900 would be 3px.

    i dont if this is relevant but found this through searching but i dont know how to implement it

    Detecting And Acting On A Window Resize


    window.onresize = function () {
    if(document.getElementById("parent_for_video").style.display !=
    "none") {
    calculate_positions();

    //Resize the main div
    gray_div = document.getElementById("gray_div");
    gray_div.style.height = h;
    gray_div.style.width = w;

    main_div = document.getElementById("main_div");
    main_div.style.height= video_overlay_height;
    main_div.style.width = video_overlay_width;
    main_div.style.top = video_overlay_top;
    main_div.style.right= video_overlay_right;

    }//if(document.getElementById("parent_for_video").style.display !=
    "none")
    }//window.onresize = function ()
    Last edited by Julia25; 07-13-2009 at 09:00 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles