Make viewer header sticky based on percentage height

Base the header stickiness on window height rather than width
to address the situation where a mobile device is held in
landscape mode.

Addresses #922