I'm trying to set the width and height of an element with javascript to cover the entire browser viewport, and I'm successful using
document.body.clientHeightbut in IE6 it seems that I always get horizontal and vertical scrollbars because the element must be slightly too big.
Now, I really don't want to use browser specific logic and substract a pixel or 2 from each dimension just for IE6. Also, I am not using CSS (width: 100% etc.) for this because I need the pixel amounts.
Does anyone know a better way to fill the viewport with an element in IE6+ (obviously all good browsers, too)?
Edit: Thanks Owen for the suggestion, I'm sure jQuery will work. I should have specified that I need a toolkit-agnostic solution.