Used clientWidth and clientHeight rather than getComputedStyle() for Firefox compatibility