I'm using this well known hack to make monospace fonts use the same font size as proportional ones:
code, kbd, tt, pre, samp, textarea {
font-size:1em;
font-family: monospace, monospace;
}
because the default is for browsers to use a smaller size for monospace, and different browsers use different sizes, so this trick is a way to make things look more similar across browsers.
However, I just found that this doesn't work on most Android browsers! Apparently, monospace, monospace
is considered an error in Chrome based mobile browsers, and they use the default proportional font instead. (Firefox is OK.)
So, does anybody know a workaround for this? I tried variants like monospace, serif
, but that didn't work either.