...

View Full Version : Font type having the same width



marf
05-10-2007, 04:41 PM
Ok basically I'm trying to output information in a 4 by 4 table. However on mobile devices, some browsers by default have the table disabled. So to keep things simple I want to just display the information with proper spacing. Because I know the max amount of data that will be in each location so spacing should be easy. However the font type displayed in the browser might have "1" be very narrow, where as "O" is wider. Is there a way to force font type or make the spacing for any character the same on a mobile browser?

whizard
05-10-2007, 05:22 PM
Wrap it in the <tt></tt> tag.

HTH
Dan

marf
05-10-2007, 08:46 PM
Thank you sir, worked like a charm.

Arbitrator
05-11-2007, 01:38 AM
It works because the typewriter text (tt) element (which should probably be avoided because its use is pretty much always presentational) sets the font to a monospace font family. You can do the same thing with the CSS declaration font-family: monospace. Some specific monospace fonts are Courier, Courier New, Lucida Sans Typewriter, Lucida Console, and Monaco, if you have a preference.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum