views:

168

answers:

2

I have a page that renders differently in each flavor of IE7.

IE7 for vista is a different version than IE7 for XP, and they have subtle differences between them. This results in having the two versions render my page differently. The same, of course, goes for IE8 in compatibility mode.

What I need is a list of every version of IE7 out there, and the list of compatibility issues between them. Does anyone know where i can get this?

A way to differentiate between them would be also appreciated, as this obviously requires more tricks than just looking at the useragent browser version (they are all listed as teh same).

+1  A: 

If the differences are only subtle, I wouldn't worry about it.

You may also try displaying the content in a different way which renders better across browsers.

Another thought, are you always defining the complete font style? If not the browser uses its default.

Also, can you use the User-Agent OS?

Steven
The original renders all look the same. The issue comes when I try to grab domElementFoo.offsetWidth in javascript. Version 7.0.6001.18000 (Vista) might return 99 while version 7.0.5730.13 (XP) might return 100.The issue occurs when the element is taking 100 pixels in length in all cases. If I try to resize the window to 99 pixles, based off of the information I got from Vista, I'll get a scrollbar.If I listen to the XP version, I'll resize the window correctly and there will be no scrollbar.What's worse is that every flavor seems to return a different value - IE8 compat mode is off by 9px
diadem
Sorry, I've never used any dom______ objects before. I was just offering some general suggestions.
Steven
@diadem Can't you prevent this problem by defining values in relative units (e.g. "%") rather than absolute ones (e.g. "px")? Trying to create a pixel perfect layout is rarely a good idea.
kangax
@kangax: The window is supposed to resize to the exact size necessary for it not to scroll without shrinking already expanded areas. That's why I need to get the total width the dom elements are currently using.
diadem
+1  A: 

I would guess that the behavior is probably theme related.

I've had IE7 change how it displays in Windows XP for certain controls like the drop down list based on what Windows Theme I had set on the computer. Switching from Windows classic to the default theme had a noticeable effect on website rendering. As for finding a list of how it displays differently under different themes, I'm honestly not sure where you find out about what causes that and how to control it. I remember my searches when I did encounter the problem didn't provide any useful information to me.

Hopefully someone here can build off what I know. :)

ICodeForCoffee
I never even considered this. I tested your theory using virtual machines and it seems you are dead on.Windows Classic made 7.0.6001.18000 behave exactly like 7.0.5730.13. You just prevented a potential nightmare - my fixes wouldn't have worked because they only check the OS. Now I have to figure out how to check the themes...
diadem
It blew my mind when I ran into this. I personally never tried to resolve this myself. We assumed the average user runs XP with the default theme, and it was only happening on the dev machines cause we were running the classic theme. It's on my list of things about IE I still just don't understand why they ever did it that way.
ICodeForCoffee