Firefox and pre font-size

My website stylesheet sets the overall font size to be 76.1%, this was working fine except for Firefox and the pre tag, it would render fine in Internet Explorer but Firefox would shrink the font size down. In order to get around this I used the following CSS:

pre, code {
   font-size: 123.9%;
   *font-size: 100.0%;
}

The asterisk in front of the font-size command means it is strictly invalid CSS which is ignored by Firefox but is still parsed by Internet Explorer.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.