This page documents a rather weird bug in the Internet Explorer CSS display engine in Windows XP, in the way it displays objects in the relation with the right handed scrollbar.

CSS positioning bug in Internet Explorer in Windows XP, with styles set
The picture above, shows two browser sessions, each in one of Windows XP's themes. The code is exactly the same, yet the distance, between the scrollbar, and the element is not.

Test case, of the bug. In the pictures above, the first element has been positioned exactly 32 pixels from the right, and for the second element has been positioned 2em from the right also, the distance is the same from the right in either case, in the normal "Lunar" interface, there's nothing wrong, and the element renders 32 pixels from the right. But in the second shot, the one on the right, the bug is seen, as the same code, in the same browser, renders the element 33 pixels from the right.

Nature of the bug

The bug only presents itself when running Windows XP in any other theme then Windows Classic, such as the new Lunar interface. The scrollbar in XP is one pixel wider then the old style grayish one, and when setting the skin back to the Classic skin, Internet Explorers render engine seems to forget, that the scrollbar is one pixel less wide, and that causes a little displacement, which can be pretty annoying, if one is trying to make a nice CSS site.

And as can been witnessed by the test case, it doesn't affect floating, so the one pixel strip is not a "no go area".

Conclusion

In positioning elements, relative to the right hand side, be aware that your results may differ in Windows XP, and that you will not be able to script your way out of this one....