Why margin: 2.5px does not work?
As others have already noted, a pixel is, by definition, the smallest unit, and therefore, by definition, cannot be divided.
Then, how to get the same margin in both browsers?
The usual solution is to set display: inline; for the item in question. In fact, some suggest that you simply apply the built-in fix to all floats if you want, making sure that the fix applies only to IE5 and IE6 (for example, using conditional comments), since there are no known side effects in these browsers.
source share