I'm having problems get pre-formatted text to render properly on my iPhone.
If I just do a single pre-formatted item, things look OK (code immediately below).
<!DOCTYPE html>
<html>
<head>
<title>Problem with <pre></title>
</head>
<style>
pre {
background-color: rgb(30, 30, 30);
color: rgb(200,200,200);
}
</style>
<body>
<!-- exactly 80 characters -->
<div style="width:80ch"><pre>asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf</pre></div>
</body>
</html>
But when I try to do the same thing within an ordered list (code immediately below).
<!DOCTYPE html>
<html>
<head>
<title>Problem with <pre></title>
</head>
<style>
pre {
background-color: rgb(30, 30, 30);
color: rgb(200,200,200);
}
</style>
<body>
<div style="width:80ch"><pre>asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf</pre></div>
<ol>
<li> <div style="width:80ch"><pre>asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf</pre></div>
</ol>
</div>
</body>
</html>
Everything looks fine when loading this from my computer, but on my iPhone, not only is the indented one messed up, now the original one looks wrong too. It's almost like the font size changed when I added the list.
Links to both versions:
How can I make this work correctly on my phone? I need the width to be 80 characters wide so I can show standard terminal output.