I\'ve been trying for a while now to \'get\' the height and width of a div on my webpage. I\'ve tried many things, some are:
document.getElementById(\"header\").
You should think about getting jQuery, as then you can just this and more very easily:
$("#header").width(); // Gets the width;
$("#header").width(50); // Set width to 50;
$("#header").height(); // Gets the height;
$("#header").height(50); // Set height to 50;
It'll make your life a lot easier in the long run too. Writing with native Javascript can be cumbersome as it requires more code and lots of cross browser testing.