Note that there are some explanatory texts on larger screens.

plurals
  1. PO*Responsive* position: fixed-like panel?
    primarykey
    data
    text
    <p>How can I make a floating panel, taller than the screen height, in an even taller page, such that the panel always remains visible, yet scrolls enough to display all parts of it?</p> <p>This strikes me as similar to the more common "<a href="https://stackoverflow.com/questions/4236151/how-to-make-a-div-always-float-on-the-screen-in-top-right-corner">panel that stays in one spot</a>", but with a bonus challenge: since my magic panel is taller than the window, anchoring the top of the panel at the top of the screen (or, indeed, <em>anywhere</em> on the screen) means that the lower regions of the panel can never be displayed.</p> <p>There may be other ways to meet the goal, but FWIW what I envision is </p> <ol> <li>When the page is scrolled to the top, the top of the panel is at the top of its display area.</li> <li>When the page is scrolled down a bit, the panel stays in sync with it, scrolling down pixel-for-pixel—it behaves <code>position:static</code> (the default).</li> <li>When things are scrolled down far enough to expose the bottom of the panel, it pins there in the ordinary "stays in one spot" style, allowing the page to scroll down further while keeping the bottom of the panel visible and immobile—it becomes <code>position:fixed</code>.</li> </ol> <p>I guess #2 could also be proportional scrolling, if that's possible, so that when the window scrolls down, say, 30% of its full travel, the panel also scrolls down 30% of its travel.</p> <p>Concretely, suppose the page height is 1000 lines, the panel height is 200 lines, and the window height is 100 lines.</p> <ol> <li>At the top, line 1 of the page is at the top of the window, and line 1 of the panel is at the top of the window.</li> <li>Scroll down a bit, and line 10 of each is at the top.</li> <li>When scrolling reaches line 101 of the page being at the top, scrolling the panel to that position would move its bottom above the bottom of the window. So instead, it leaves its line 100 at top and stays <code>position:fixed</code> as you scroll further down.</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload