FireFox bug with pre and ex

By Xah Lee. Date: ,

addendum: The info on this page may not be correct. The “ex” unit in CSS does not mean the width of lowercase letter x. I forgot what's the context when i wrote this page.

this box 70 CSS ex unit with monospace font
123456789 123456789 123456789 123456789 123456789 123456789 123456789
xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxx xxxxxxxxx

In above, the border should enclose the text, not cut into it.

FireFox and iCab rendered this incorrectly. They did not take account of the font-family when considering the “width:70ex”. (View Source)

Opera and Safari rendered correctly.

pre ex firefox
FireFox's rendering
pre ex safari
Safari's rendering.

The versions tested are:

BUY ΣJS JavaScript in Depth