Why does bold monoface shift vertically on Windows?

Posted by Aaron Digulla on Stack Overflow See other posts from Stack Overflow or by Aaron Digulla
Published on 2010-03-12T11:24:11Z Indexed on 2010/03/12 11:27 UTC
Read the original article Hit count: 272

Filed under:
|
|
|
|

In Firefox 3.6, IE7 and Opera 10 on Windows, this HTML has an odd behavior:

<html><head></head>
<style>
span {
    font-family: monospace; background-color: green;
}
span.b {
    font-weight: bold;
}
</style>
<body>
<span>Text</span><span class="b">Text</span><span>Text</span>
</body>
</html>

The bold span in the middle is shifted down by one pixel. That doesn't happen for other fonts.

Why is that? How can I fix it?

© Stack Overflow or respective owner

Related posts about html

Related posts about monospace