|
Gil -> RE: First Order of Business (5/20/2003 15:05:41)
|
Q: Why are my font sizes different in different browsers (I' m using ems or %)? Netscape 4 and early versions of IE do not support these properties correctly. They will work (in the most part) correctly in Netscape 6 or IE 5. To avoid the problem do not specify font sizes at all. If this is unacceptable to you, you should exclude the font size declarations by means of an @import statement: STYLE SHEET: @import url(nameoffile.css); All of the font size declarations go in the imported style sheet. This will remove the problems, but will mean that the older browsers do not get font size declarations. If you must specify fonts in these browsers, you can use pixels, but before doing so please read the note below. Q: Why are my font sizes different in different browsers (I' m using keywords such as large and small)? These are fundamentally broken by incorrect implementations. Do not use them. Either do not specify font sizes at all, use ems and % in accordance with the instructions above, or else use pixels, again subject to the note below. Q: Why are my font sizes different on different platforms (I' m using points)? A: When you specify a font size in points, it means a certain number of inches. 1pt is, in CSS, 1/72in. As a result, when you specify a font size as (say) 12pt, it is equivalent to 1/6in. Because the computer has no idea how large your monitor is, it uses a (large arbitrary) conversion factor. For example, the Mac OS is most commonly configured to treat 1 inch as 72 pixels. Windows, by comparison is 96 pixels. As a result, text is usually 25% smaller on the Mac. Therefore that which is comfortable for you on your Mac will (usually) be too large for you on a Windows machine, and that which is comfortable on your Windows machine will be illegible on a Mac. If you require further information on this subject, please read http://richinstyle.com/masterclass/lengths.html. Q: Why shouldn' t I specify fonts in pixels? A: Fonts specified in pixels do not relate to the user' s ability to see. As such, they present accessibility difficulties for the partially sighted. It is possible to avoid these difficulties, either by using ems and %, or else not specifying font sizes at all. Furthermore, in some countries, including America, it is potentially against the law to present these kind of accessibility problems. However, if your design is more important to you than accessibility, and as such, you will ignore this advice, it is preferable to specify fonts in pixels than in points, because with pixels you avoid the point-problems described above. Q: Why do my styles look different in Netscape than Explorer? A: As can be seen from the 250+ Netscape bugs at http://richinstyle.com/bugs/netscape4.html, Netscape is very badly buggy. However, in many cases it is because your CSS is invalid that it does not work in Netscape: Explorer will accept all kinds of garbage. To check whether this is so, you should validate it.
|
|
|
|