pre{font-family:cursive;font-style:italic;font-size:xxx-small}
How to change pre
font size?
While the font-size cannot be changed for text directly inside pre tags, you can always wrap that text in another element (a span, for example) and change the font size of that element.
Set Font Size With Em 1em is equal to the current font size. The default text size in browsers is 16px.
How to Change Font Type in HTML. To change font type purely with HTML, use the CSS font-family property. Set it to the value you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a paragraph, heading, button, or span tag.
While the font-size cannot be changed for text directly inside pre tags, you can always wrap that text in another element (a span, for example) and change the font size of that element.
For example (this is inline-styles, but could be put in CSS if you wanted):
<pre><span class="inner-pre" style="font-size: 11px"> Blah blah Multiple lines and no br's! Oh yeah! </span></pre>
Your issue is probably due to Courer being used as the default font, if you set Courier New as the preferred font it should be fine.
The following works fine in both Firefox & IE
pre { font-family: "courier new", courier, monospace; font-size: 11px; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With