tags:

views:

23

answers:

1

I have a page that has a position:fixed div at the top:0px and bottom:0px (making a header and footer). When either the header or footer has "focus", I am able to use PageDown, PageUp, Home, End, and Spacebar to scroll the page. But if I click within the main "content" div and try to use those keys, it no longer works.

There aren't any page/body/form-level scripts that are listening for onkeydown/onkeyup.

I'm developing for Internet Explorer 7.

Does anyone know why this happens?

+1  A: 

There is something else going on with your page that is preventing those keys from performing. Strip out everything except the header, footer, and content area.

<div style="position:fixed; top:0px; height:100px; background-color:pink;">header</div>
<div style="width:100%; height:900px; background-color:orange;">content</div>
<div style="position:fixed; bottom:0px; height:100px; background-color:skyblue;">footer</div>

Validate that the keys are working how you expect them to. Then start reassembling the page one major section at a time until you run into the issue again.

Utensil
Thanks for leading me to investigate elsewhere. There was a renegade div wrapping the main content (left over after cleaning up the original mess of the page) that was preventing the keys from working =)
SAGExSDX