When I view this document in Netscape, the first line of text is in Arial 7.5 pt font, the second line in 10 pt font, the third in 12 pt, and the fourth in 13.5 pt font. This is as I intended.
However, when I view the document in Internet Explorer, the first line displays in 10 pt font, the second in 12 point font, etc. In other words, everything is one size bigger!
And yet, if I copy the text from my IE browser window (where it is one size to big) into MS Word, Word shows it at the correct size.
Also, I discovered this whole problem because the text in a friend’s webpage seemed to be displaying too large, but that page displays fine in IE when I view it at the library. The problem only shows up when I view it on my home computer. So this makes me think that there’s something wrong with the settings on my own copy of Internet Explorer. (I checked on the Microsoft website, and I’m using the most up to date version of IE 6)
Can anyone tell me what could be causing this problem?
I suspect you have IE zoomed in a little; have you tried holding down the <CTRL> key and rolling your mouse wheel (if you have one - if not, try View>Text Size)
By the way, does anyone know a way to prevent text on your webpage from being resized in this way when other people view it (i.e. some HTML code to prevent this resizing)? On my friends website (where I first noticed the problem) it really screws things up, since he has text in fixed positions, and for the larger font sizes the different lines of text end up overlapping.
Zooming doesn’t seem to work here at the SDMB, so… viewing source… ack! - dunno what I’m looking at here (I’m not an HTML wizard) - cascading styles sheets, is it? Font sizes are explicitly described by point size.
I’m sure there will be people that will tell you it isn’t a good idea to lock the font scaling, because of accessibility issues with partially sighted visitors.
Oy. Welcome to the fabulous world of HTML, and to hoping that what you code will actually appear vaguely similar on different browsers. I’ve spent the last week debugging a perfectly good web site (around 150 pages in size) that displayed well on Safari, Mac IE, and Firefox, but fell to pieces on IE for the PC. (Just an FYI, IE, esp., for the PC, tends to render a lot of fonts like ass … but since 90% of the world uses it, there’s really no way out of this particular hell.)
Yes, you can prevent resizing. You need to specify the font size in exact pixels (NOT points, as you would think … since the point:pixel ratio is not constant between browsers, and things can get unexpectedly screwy).
Look into CSS: Cascading Style Sheets. There are a couple of ways to do things, but the best way to handle fonts, IMO, is to do the following:
(A) write a file called, say, “stylesheet.css” that contains your font info.:
(B) write your web page like this:
The advantages to an external stylesheet: (1) you don’t have to specify the font face, size, color, weight, etc., for every single paragraph on each page–just use the “class” feature (2) if you change your mind about something (say, you need the main paragraph font to be 14 pixels instead of 12 pixels, and the header to be green), you just have to change it in the stylesheet, and then it will propagate across every web page that links to it. Verrrrry handy. Trust me.
Another way to stop your text being resized is to render it all as images; this also stops people copying and pasting it, but it really isn’t something I would recommend for all kinds of different reasons.