I've been wrestling with my site design for several weeks now and am running out of solutions fast. Problem is, my site uses layers which span the width of the users screen, but the width of the layers are calculated in pixels based on the clientWidth and clientHeight of the browser. This works fine when the site it loaded into a browser window that is maximized, but when it loads in a window that isn't maximized, or has toolbars (like 'Favorites', or they use MSN Explorer) on the side of the browser, it looks distorted. So the easy solution was to calculate the size of the toolbars and borders by subtracting the clientWidth and clientHeight from the width and height of the window itself, then from there calculating what the clientWidth and clientHeight would be if the browser was maximized, then render to those values. Worked relatively well in Mozilla... IE won't let you have that information (window width and height).
So I moved on to trying percentages instead of pixels. Again, some of the layers span the entire browser window, so I literally set the width of a layer to 100%. This worked fine in Mozilla, but IE wanted to be a pain again and added margins to the right side of the browser... which no matter what I tried, I could not get rid of.
So now I'm left scratching my head again as to how to make my site appear the way it's supposed to without having to worry about user's browser settings. Then I thought of loading the site into a new external (pop-up if you want to call it that) window. That way I can set the size of the window and everything will render accordingly and will look generally the same on all systems, regardless of the browser being used. However, I'm wondering about the ethical issues associated with doing this. Obvously no-one likes pop-up windows to display advertisements, but to display the website that you request is kinda a different story is it not? I've been to some sites that do this, so it can't be completely taboo, but is it generally acceptable to do this?
I'm wrestling with this issue so I thought I'd post to try and get other peoples opinions. Any thoughts?
Thanks,
- skubik.