get width/height from dom