Is There Such A Thing As Fractional Pixel?
I just started helping some work colleagues with some web design. Nothing major, but I have a problem with styled menu elements that are supposed to fill div area allocated and I n
Solution 1:
There is no such thing as fractional pixel. Pixel is the smallest screen unit.
The thing you're experiencing happens because of the browsers math engines. Some of them round the decimal pixel part up to the next integer, and some of them floor it down.
To avoid that just define your pixels without decimal points. If you want to make the 2 elements visually closer you can play around with colors, for example - if you give a darker border to some elements they will seem to be closer - http://jsfiddle.net/fDbUj/
Post a Comment for "Is There Such A Thing As Fractional Pixel?"