crop_rotate
Run
<!DOCTYPE html> <html> <head> <title> DOM Style offsetWidth Property </title> <style> #GFG { height: 150px; width: 300px; padding: 10px; margin: 15px; background-color: green; } </style> </head> <body> <h2>DOM Style offsetWidth Property</h2> <div id="GFG"> <b>Information about this div:</b> <p id="demo"></p> </div> <button type="button" onclick="myfun()"> Submit </button> <script> function myfun() { var element = document.getElementById("GFG"); var txt = "Width including padding and border: " + element.offsetWidth + "px"; document.getElementById("demo").innerHTML = txt; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCg0KPGhlYWQ+DQoJPHRpdGxlPg0KCQlET00gU3R5bGUgb2Zmc2V0V2lkdGggUHJvcGVydHkNCgk8L3RpdGxlPg0KDQoJPHN0eWxlPg0KCQkjR0ZHIHsNCgkJCWhlaWdodDogMTUwcHg7DQoJCQl3aWR0aDogMzAwcHg7DQoJCQlwYWRkaW5nOiAxMHB4Ow0KCQkJbWFyZ2luOiAxNXB4Ow0KCQkJYmFja2dyb3VuZC1jb2xvcjogZ3JlZW47DQoJCX0NCgk8L3N0eWxlPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4gOjotd2Via2l0LXNjcm9sbGJhcnt3aWR0aDo3cHg7aGVpZ2h0OjdweDt9Ojotd2Via2l0LXNjcm9sbGJhci10cmFja3tiYWNrZ3JvdW5kOiNmZmY7fTo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWJ7Ym9yZGVyLXJhZGl1czo1cHg7YmFja2dyb3VuZDojMmY0NWZmO308L3N0eWxlPjwvaGVhZD4NCg0KPGJvZHk+DQoJPGgyPkRPTSBTdHlsZSBvZmZzZXRXaWR0aCBQcm9wZXJ0eTwvaDI+DQoNCgk8ZGl2IGlkPSJHRkciPg0KCQk8Yj5JbmZvcm1hdGlvbiBhYm91dCB0aGlzIGRpdjo8L2I+DQoNCgkJPHAgaWQ9ImRlbW8iPjwvcD4NCg0KCTwvZGl2Pg0KDQoJPGJ1dHRvbiB0eXBlPSJidXR0b24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