Situation:
- There is a textarea that is taller than the browser window (and full of text).
- There is a
position:fixed;
bar at the top. - When the text in the textarea is edited and scrolled down and the user scrolls back to the top of the textarea with the cursor keys, the top of the text area stays hidden behind the "bar at the top".
Question: How can the layout be changed (HTML, CSS) so that the first lines of the textarea become visible through keystrokes inside the text area?
I have tried:
- adding margin or padding to textarea
- adding margin or padding to div containing textarea
- adding padding to body element
To be clear: some of these measures help that the whole text area becomes visible when the mouse is used to scroll to the top. The textarea should be accessible fully through the cursor keys on the keyboard.
Demo: jsfiddle