Page 1 of 1
Monospace font problem
Posted: Wed Jul 26, 2006 11:25 pm
by paultfh
I am outputting data to a table and I need each character to be the same widrh.
I can't find a monospace font that works.
My style:
Code: Select all
tr.monotext {
font-family: "Courier New", Courier, monospace;
}
Strings with capital letters end up being longer than comparable strings with lower case.
Am I missing something?
Posted: Wed Jul 26, 2006 11:27 pm
by feyd
table rows don't have text.

Posted: Wed Jul 26, 2006 11:32 pm
by paultfh
Hmmm. It has been changing the text when I enter different fonts in there.
Changed to td and switched them to the cells. Same output, same problem.
Posted: Wed Jul 26, 2006 11:34 pm
by paultfh
Code: Select all
<style type="text/css">
body {
background: none;
}
td.monotext {
font-family: font-family: "Courier New", Courier, monospace;
}
</style>
Code: Select all
<td class=\"monotext\" align=left>{$number}</td>
<td class=\"monotext\">".$arr['nzbID']."</td>
<td class=\"monotext\">". $nzb->truncate_string($arr['name'],50) . "</td>
<td class=\"monotext\">" . $arr['groupname'] . "</td>
<td class=\"monotext\" align=center>".$age."</td>
<td class=\"monotext\" align=right>".$arr['numfiles']."</td>
<td class=\"monotext\" align=right>" . $nzb->readablesize($arr['size']) . "</td>
Posted: Thu Jul 27, 2006 1:35 am
by Benjamin
I believe text inside of <pre> tags is monospace, and you can set the size with css.
Posted: Thu Jul 27, 2006 1:45 am
by daedalus__
uh
Code: Select all
td.monotext {
font-family: font-family: "Courier New", Courier, monospace;
}
Posted: Thu Jul 27, 2006 5:30 am
by paultfh
Daedalus- wrote:uh
Code: Select all
td.monotext {
font-family: font-family: "Courier New", Courier, monospace;
}
Sorry, copy paste problem.
Posted: Thu Jul 27, 2006 2:49 pm
by pickle
This is a long shot - but do you have Courier New or Courier installed. 100% of systems I've been on do, but you never know...
Posted: Thu Jul 27, 2006 3:36 pm
by paultfh
Yup, they're installed.
Posted: Thu Jul 27, 2006 3:53 pm
by paultfh
astions wrote:I believe text inside of <pre> tags is monospace, and you can set the size with css.
That worked, thanks.