Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Flickering when resizing the browser

Flickering when resizing the browser

Scheduled Pinned Locked Moved Web Development
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 3 Offline
    3 Offline
    3nbar A7mad A
    wrote on last edited by
    #1

    Hi, I'm trying to build a page that have a header, middle pane, and a footer. The footer should be always floating on the lower edge of the window, and the header and footer heights should remain constant. I created 3 div sections. And the only way I found to do this is to always resize the height of the middle pane when the user resizes the window and make it equal to window height minus header and footer heights. But this caused the page to be flickering so much while user is resizing the page. Does anyone has an idea about how could I stop this flickering?:confused: Thanks, Ahmed

    E 1 Reply Last reply
    0
    • 3 3nbar A7mad A

      Hi, I'm trying to build a page that have a header, middle pane, and a footer. The footer should be always floating on the lower edge of the window, and the header and footer heights should remain constant. I created 3 div sections. And the only way I found to do this is to always resize the height of the middle pane when the user resizes the window and make it equal to window height minus header and footer heights. But this caused the page to be flickering so much while user is resizing the page. Does anyone has an idea about how could I stop this flickering?:confused: Thanks, Ahmed

      E Offline
      E Offline
      Edbert P
      wrote on last edited by
      #2

      It seems that this happens only on IE as it raises the onResize event multiple times until the user stops resizing the window. You can try introducing a delay in calling the resizing function, like the example below:

      <!--
      var resizeDelay;

      function resize()
      {
      <code>//Your resizing calculation</code>
      document.body.style.backgroundColor=(document.body.style.backgroundColor=="black")?"white":"black";
      }

      onresize=function()
      {
      <code>//Call this method during onresize</code>
      clearTimeout(resizeDelay);
      resizeDelay=setTimeout("resize()", 200);
      }
      //-->

      "Democracy is two wolves and a sheep voting on what to have for dinner" - Ross Edbert Sydney, Australia

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups