I have a HTML page with on the left side a textarea and on the right side a div.
both have 100% height and 50% width. The div has a overflow so it will never stretch the page.
I want all content that is entered in the textarea to be copied to the div so they’ll always be the same. While this is no problem it goes wrong when the content gets to big for the page and we start scrolling. I would like to scroll the div along with the textarea.
Any ideas on how to do this?
I found the answer.
using the onscroll function and than using the scrollTop attribute seems to work.
thanks anyways 😉