How to get font-size independant of screen settings?

liunx

Guest
Is there a way to get a font-size more or less independent of the screen settings, so that a text is not much smaller seen on one screen than another ? <br />
Kippie<!--content-->Specify the fontsize in pt or mm.<br />
style="font-size: 10pt"<!--content-->Thanks for quick reaction. I tried the following code:<br />
<br />
<html><br />
<head><br />
<style type="text/css"><!--<br />
.lettergrootte { font-size: 10mm }--><br />
</style><br />
</head><br />
<body><br />
<p class="lettergrootte">What happens with these letters when you change the screen setting?<br />
</body><br />
</html><br />
<br />
But the letters are much bigger in 800x600 then in 1024x768.<br />
Is there another solution or is this the best there is?<br />
<br />
Kippie<!--content-->There's often a difference between the computed value and the actual value:<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-size">http://www.w3.org/TR/REC-CSS2/fonts.htm ... -font-size</a><!-- m --><!--content-->Can I do something about that?<!--content-->A variation on this may help, if Javascript is allowed...<br />
<br />
<h1 style="font-family: verdana; text-align: center; font-size: expression(document.body.clientWidth / 15)">PUT HEADING TEXT HERE</h1><br />
<br />
The heading text size will increase/decrease as the browser expands/contracts. It works in IE5/6 and N6, but I haven't tried version 4 browsers.<br />
Also, using point sizes for fonts should be avoided. To see why, read <!-- m --><a class="postlink" href="http://www.alistapart.com/stories/fear4/3.html">http://www.alistapart.com/stories/fear4/3.html</a><!-- m --><br />
<br />
Hope it helps.<!--content-->Thanks Colin,<br />
This brings some light in this problem. Could you clarify a little bit how this works? For example why "/15" ? And do you know somewhere an example on the web where this code is used?<br />
Kippie<!--content-->
 
Back
Top