Im designing a DIV container that will contain some rows of text. Every row can contain 0 to 35 chars.
I need to specify a fixed width for the div, but I cannot predict how "wide" the string can be.
An example of strings (all 35 chars):
- aeR1riPhah9chaicaegae7oobaiz8eiquoL
- iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
- da da da 35 chars text With CApital
As you notice, the glyph "i" is less wide than "L".
A possible solution could be to use a Monospaced font, but for some stylistic constraints I need to use Arial (or equivalent font).
The idea is to size the container considering a string that contains the largest glyphs, but I am not sure what is the largest glyph, especially if we consider all the UTF characters..
Any help, advice would be really appreciated!
em). They're not strictly the widest, but something strange will be happening if the average character in a string is wider than this.overflow: autoshould cover very strange cases like this. – user568458 Jul 26 '12 at 15:12