I cannot seem to get my font sizes right where I want them. I have the font statement
<font face="Comic Sans MS" size="4" color="#000000">
How would that look if I wanted to state the font size in points?
Chuck
I cannot seem to get my font sizes right where I want them. I have the font statement
<font face="Comic Sans MS" size="4" color="#000000">
How would that look if I wanted to state the font size in points?
Chuck
-------------------------------------------------
"Good judgment comes from experience, and experience - well, that comes from poor judgment."
~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
The <font> tag has been deprecated. In other words, it is considered historical baggage from a bygone era that we're not supposed to use any more.
The numeric sizes in the <font> tag correspond to levels such as smaller, small, medium, large, larger, and do not have any guaranteed fixed value.
For better results, you can use CSS to create short-hand class names, for example, in your <head>:
And you can use them in the <body> in a wide variety of ways:Code:<style type="text/css"> .comic14black{ font-family: "Comic Sans MS", sans-serif; font-size: 14px; color: #000; } </style>
Note that I used px for pixels instead of pt for points, since converting point sizes to pixels may cause rounding issues.
Jefferson;
OK, the attached shows your code. Now, what if all I want to change, in the body, halfway through, is the size of the font?
I can't seem to just specify the one trait.
Chuck
-------------------------------------------------
"Good judgment comes from experience, and experience - well, that comes from poor judgment."
~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"
Chuck,
I think what you want is:
BTW: CSS defines 7 relative font sizes xx-small, x-small, small, medium, large, x-large, and xx-large. If you use these then in modern browsers when the user zooms using Ctrl + Mouse Wheel all the fonts will retain their size relative to all the others. As a mature (hopefully) citizen I really appreciate sites that do this as opposed to those who don't since I can make the text the size my eyes can handle.Code:<body class="comic14black;"> <!-- From here on everything is as above unless you change it as in the DIV below--> <br> <div style="font-size: 24px;">This whole Division is 24px. <p> </p> <p>And this as well </p> </div> </body>![]()
Last edited by RetiredGeek; 2011-07-30 at 19:58.
Thanks RG!
Chuck
-------------------------------------------------
"Good judgment comes from experience, and experience - well, that comes from poor judgment."
~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"
Good advice given. One additional point (if it matters)...
Pixels (px) are an absolute size, and will override the browser's ability to resize the text. If you want the same effect but also resizeable, use EMs. The numbers will be much smaller though (e.g., if I recall correctly, 14px is approximately 1.2em). Happy coding!
Jethro, that sounds like a good idea.
Thanks,
Chuck
-------------------------------------------------
"Good judgment comes from experience, and experience - well, that comes from poor judgment."
~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"
I think 1em = 16px.
In recent browsers, the text+graphics zoom feature can expand pixel measurements as well.
Thanks Jefferson.
Chuck
-------------------------------------------------
"Good judgment comes from experience, and experience - well, that comes from poor judgment."
~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"