Thursday, October 14, 2010

Sub pixel chromium

I have been trying to get one particular div to show up on my page for ages now. It shows fine in Firefox but not in chrome. After some red herrings around opacity (aka webkit-opacity), I finally figured out what the issue was, good old border width!

Apparently this works in FF but not in chrome: border-width: 0.1px;

Changing it to this makes both browsers ignore it and put a border of 1 px: border-width: 0.1 px;

This is what finally made it work: border-width: thin;

Hmm, so that gives me what I want, but now curious if FF does really support sub-pixel borders as a real valued function? Actually, it doesn't. It just assumes anything less than 1 pixel as "thin". It behaves even more weirdly when values are greater than one, need to investigate it a little more in detail.

No comments:

Post a Comment