crop_rotate
Run
<!DOCTYPE html> <html> <head> <style> #myDIV { height: 250px; width: 400px; padding: 10px; margin: 15px; border: 5px solid red; background-color: lightblue; } </style> </head> <body> <p>Click the button to get the height and width of div, including padding (using both clientHeight and clientWidth).</p> <button onclick="myFunction()">Try it</button> <div id="myDIV"> <b>Information about this div:</b><br> Height: 250px<br> Width: 400px<br> padding: 10px<br> margin: 15px<br> border: 5px<br> <p id="demo"></p> </div> <script> function myFunction() { var elmnt = document.getElementById("myDIV"); var txt = "Height including padding: " + elmnt.clientHeight + "px<br>"; txt += "Width including padding: " + elmnt.clientWidth + "px"; document.getElementById("demo").innerHTML = txt; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KPHN0eWxlPg0KI215RElWIHsNCiAgaGVpZ2h0OiAyNTBweDsNCiAgd2lkdGg6IDQwMHB4Ow0KICBwYWRkaW5nOiAxMHB4Ow0KICBtYXJnaW46IDE1cHg7DQogIGJvcmRlcjogNXB4IHNvbGlkIHJlZDsNCiAgYmFja2dyb3VuZC1jb2xvcjogbGlnaHRibHVlOw0KfQ0KPC9zdHlsZT4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+IDo6LXdlYmtpdC1zY3JvbGxiYXJ7d2lkdGg6N3B4O2hlaWdodDo3cHg7fTo6LXdlYmtpdC1zY3JvbGxiYXItdHJhY2t7YmFja2dyb3VuZDojZmZmO306Oi13ZWJraXQtc2Nyb2xsYmFyLXRodW1ie2JvcmRlci1yYWRpdXM6NXB4O2JhY2tncm91bmQ6IzJmNDVmZjt9PC9zdHlsZT48L2hlYWQ+DQo8Ym9keT4NCg0KPHA+Q2xpY2sgdGhlIGJ1dHRvbiB0byBnZXQgdGhlIGhlaWdodCBhbmQgd2lkdGggb2YgZGl2LCBpbmNsdWRpbmcgcGFkZGluZyAodXNpbmcgYm90aCBjbGllbnRIZWlnaHQgYW5kIGNsaWVudFdpZHRoKS48L3A+DQoNCjxidXR0b24gb25jb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