monospaced font

liunx

Guest
I am trying to create a style to display monospaced font (Courier) in a small size and I am not having any luck. I tried adding monospaced to the font family line and that didn't seem to help either. Any one else seen this or have any ideas?Does this not work?


<style type="text/css">
p {
font-family: monospace;
font-size: x-small;
}
</style>I have over 500 fonts installed on my computer, and not one of them is called "monospace". Remember, you have to specify a specific font, not just a style of font.
-DamOriginally posted by DanieLTomaS
I have over 500 fonts installed on my computer, and not one of them is called "monospace". Remember, you have to specify a specific font, not just a style of font.
-Dam That's not true. From the CSS2 Reference:

"<generic-family>
The following generic families are defined: 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace'. Please see the section on generic font families for descriptions of these families. Generic font family names are keywords, and therefore must not be quoted.

Authors are encouraged to offer a generic font family as a last alternative, for improved robustness."Or something like:

p {
font-family: "Courier New", Courier, monspace;
font-size: .75em;
}thanks allWelcome.
 
Back
Top