You can achieve this by first creating a div element in HTML with an id attribute:
27 chars2 lines
Then, you can use CSS to style the div element to be the height of the screen and have a horizontal scroll with overflow-x:
76 chars6 lines
Next, you'll need to add content to the scrollDiv dynamically using JavaScript. You can do this by selecting the scrollDiv using its id and appending child elements to it:
index.tsx839 chars12 lines
Finally, you'll want to resize the height of the scrollDiv to always be 80% of the screen height when the window is resized using the window.addEventListener method:
index.tsx181 chars7 lines
This will ensure that the scrollDiv adjusts its height dynamically as the window size changes.
gistlibby LogSnag