crop_rotate
Run
<!DOCTYPE html> <html> <head> <style> #myDIV { margin-top: 10px; height: 250px; width: 250px; overflow: auto; } #content { height: 800px; width: 2000px; padding: 10px; background-color: coral; } </style> </head> <body> <p>Click the button to get the entire height (vertically) and width (horizontally) of the div element with id="content".</p> <button onclick="myFunction()">Try it</button> <div id="myDIV"> <div id="content">Some content..</div> </div> <p id="demo"></p> <script> function myFunction() { var elmnt = document.getElementById("content"); var y = elmnt.scrollHeight; document.getElementById ("demo").innerHTML = "Height: " + y ; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KI215RElWIHsNCiAgbWFyZ2luLXRvcDogMTBweDsNCiAgaGVpZ2h0OiAyNTBweDsNCiAgd2lkdGg6IDI1MHB4Ow0KICBvdmVyZmxvdzogYXV0bzsNCn0NCg0KI2NvbnRlbnQgew0KICBoZWlnaHQ6IDgwMHB4Ow0KICB3aWR0aDogMjAwMHB4Ow0KICBwYWRkaW5nOiAxMHB4Ow0KICBiYWNrZ3JvdW5kLWNvbG9yOiBjb3JhbDsNCn0NCjwvc3R5bGU+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPiA6Oi13ZWJraXQtc2Nyb2xsYmFye3dpZHRoOjdweDtoZWlnaHQ6N3B4O306Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNre2JhY2tncm91bmQ6I2ZmZjt9Ojotd2Via2l0LXNjcm9sbGJhci10aHVtYntib3JkZXItcmFkaXVzOjVweDtiYWNrZ3JvdW5kOiMyZjQ1ZmY7fTwvc3R5bGU+PC9oZWFkPg0KPGJvZHk+DQoNCjxwPkNsaWNrIHRoZSBidXR0b24gdG8gZ2V0IHRoZSBlbnRpcmUgaGVpZ2h0ICh2ZXJ0aWNhbGx5KSBhbmQgd2lkdGggKGhvcml6b250YWxseSkgb2YgdGhlIGRpdiBlbGVtZW50IHdpdGggaWQ9ImNvbnRlbnQiLjwvcD4NCg0KPGJ1dHRvbiB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