by steg0010 » Wed Feb 22, 2012 2:40 pm UTC
Thank you for your help. I had a look at those, but I am still having the same problem. I have realised that the problem only occurs when setting the font-size using a percentage. Even though each browser has the default font set the to the same (New Times Roman - Size 16), when setting the size to anything other than 100% each browser has their own interpretation. Firefox seems to be the one that is being problematic, then again it could just be the only one that is doing what it is supposed to.
To observe the problem I've been creating background images 1px by npx, where n is equivalent to the line-height (found by trial and error, with the line-height being set to 1, and the font-size being changed, set as a percentage). I then display a single paragraph of text (a large extract from Shakespeare's Romeo and Juliet) over the top of the tiled background and compare the results in Chrome, Firefox and IE. Chrome and IE show the same results, but the line-height in Firefox appears to be smaller. One test I did, Chrome and IE showed one background line for each text line. Firefox showed 35 background lines for every 36 lines of text.
Do browsers show font sizes to the same scale, pixel-wise, or is the problem with the browser's interpretations of percentages, differing in how they round values which are not exact?