On Oct 12, 12:47 am, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
Quote:
Scripsit Kai-Mikael Jää-Aro:
>
Quote:
Here is an example HTML file:
I don't think it's a real web page of yours.
Of course it isn't, what gave you that idea? As I wrote, it is an
example, concisely demonstrating the problem.
Quote:
Quote:
<p>fluffier <tt>firefly</ttfisticuffs</p>
And why would you do that?
Do what? Use mono-spaced text in the middle of a paragraph? I do that
all the time for filenames, code snippets and such. Is there any
reason I shouldn't?
Quote:
Quote:
The text looks a bit strange, as the middle word is not only rendered
in a fixed-pitch font, but the type size is also changed.
Andy gave a good theoretical answer (and I mean "theoretical" in a positive
sense), which might be what you are after. If you have a practical problem,
I'm afraid you need to reveal it to us before we can solve it.
I *thought* I explained my problem quite clearly: browsers introduce
(to me) unexpected size changes in displayed text depending on the tags
used. That causes the practical problem that the text looks bad and I
wanted to know if there was any global method of disabling the
size-changes. Andy's and Andreas' responses (for which I give thanks)
have been sufficient to inform me that this is intentional behaviour on
the part of the browser and that (as far as I have been able to infer)
this is limited to mono-spaced text and it therefore is sufficient to
ensure that tt and code tags are set with a font-size of 100% (which
magically affects all mono-spaced text).
Quote:
There _are_ real problems with monospace font size reduction when
representing program code, for example, but they are really a CSS matter.
The HTML side of the matter is that you should use <tt_only_ when you want
to say "I'm not saying anything about the meaning of this element except
that I'd like it to appear in a monospace font, though indirectly I'm saying
that it it's _not_ computer code or sample output".
Well, the tt tag was for the purpose of the simplified example, the
real code looks rather messier as it is software-generated and uses
span and style sheets, but I checked that it would give the same
effect.
Quote:
Quote:
In fact, if I use
<styleclauses to force the font size of both <pand <ttto the
same size, they look perfectly OK together.
If you could really force them to the same size, you would guarantee that
they are not OK to the _majority_ of users. One size does not fit all;
whatever fixed size to pick up, the odds are that _most_ people would really
rather read something smaller or something larger.
My point was not that I wanted to enforce an *absolute* font size,
quite the opposite, but that I checked that the font-size changing done
by the browser in fact was quite unnecessary as the text looked better
when both pieces were set at the same font size, *regardless of what
that size was*.
Quote:
But this is commonplace
CSS knowledge wherever CSS experts hang around.
I asked for help precisely because I am not a CSS expert. I thought I
made a reasonably good explanation of my problem and since I received
advice that solved my problem my explanation seems to have been good
enough.