i have this simple div that has some text in it , and this css
#mydiv{
width:100px ;
height :300px;
border : 1px solid black ;
overflow : auto
}
so far the div has no scroll , when i minimize the window’s height the body scroll appers
so you can see the content of that div
See this jsFiddle
QUESTION
How can i disable the body scroll and use the div scroll instead , make the div always visible
Just make sure there is enough content to make the div scroll….in your example, it fits nicely.
Here is the adjustment: