If you do not want to use the position: absolute (because it ruined your listing, if your fields should be different than all zeros), you can do this with a bit of JavaScript.
Customize your body and div to allow div scrolling:
<body style='overflow:hidden'> <div id=scrollablediv style='overflow-y:auto;height:100%'> Scrollable content goes here </div> </body>
This method depends on the div having a set height, and for that we need JavaScript.
Create a simple reset function for scrollable div height
function calculateDivHeight(){ $("#scrollablediv").height(window.innerHeight); }
And then call this function both when loading the page, and when resizing.
// Gets called when the page loads calculateDivHeight(); // Bind calculate height function to window resize $(window).resize(function () { calculateDivHeight(); }
Vincent Jun 14 '16 at 23:16 2016-06-14 23:16
source share