Forum Moderators: open
References:
[quirksmode.org...]
p.s. On my Mac the bar is 22 pixels, according to a pixel ruler program.
I'm assuming that bar is a fixed number of pixels, someone please correct me if this is wrong
Unfortunately, I think the window title/header bar is of variable height (Windows), depending on the users Control Panel > Display Properties. Classic Style / XP Style, Text Size and Theme can all have an effect on the height of the title bar.
<added> And, yes ... the title bar is of variable height depending on a number of factors such as font size, theme, etc.
[edited by: DrDoc at 10:52 pm (utc) on Feb. 9, 2007]
[pre]
if(self.innerHeight){
hdiff = self.screen.availHeight - self.innerHeight;
wdiff = self.screen.availWidth - self.innerWidth;
} else {
hdiff = self.screen.availHeight - document.documentElement.offsetHeight;
wdiff = self.screen.availWidth - document.documentElement.offsetWidth;
}
[/pre]
Untested note: I think this method can be altered/used as long as you are able to maximize your browser window to fit the avail width and height. Note that if you're not opening a new window you will have to put your detect code into onLoad I think because otherwise it will try to detect the size differences before the window resizes itself...