I am trying to get the width and height of an element. My element is a DIV with the id of "page".
The current code is not working as my div has a border and it allows my button to go out of the border.
I have tried the .offsetWidth as well as .clientwidth - Both returned null values.
var buttonState = document.getElementById("clickMe");
var maxArea = document.getElementById("page");
var pageWidth = maxArea.width;
var pageHeight = maxArea.height;
var screenWidth = 0;
var screenHeight = 0;
var buttonSize = 4;