I've created a div called 'demo' and I want it to start scrolling when it exceeds its defined size. Additionally, I would like to track the dimensions of the div so that next time I open my project, it automatically assigns those dimensions to the div.
Currently, I am manually setting double the height and width of the div. Can anyone please advise on how to achieve this? Thank you in advance.
Here is the CSS for my div:
#demo{
top:80px;
position: absolute;
background-image:url(../images/bg6.jpg);
width: 2000px;
height: 1500px;
overflow: auto;
overflow-y: scroll;
}