Making text align equally in both IE and Chrome

Posted by bobo on Stack Overflow See other posts from Stack Overflow or by bobo
Published on 2010-05-18T04:59:46Z Indexed on 2010/05/18 5:11 UTC
Read the original article Hit count: 273

Filed under:
|
|
|
<style type="text/css">

h2{

font-size:13px;
line-height:16px;
color:#000000;
margin:0;
padding:6px 22px;
font-family: 'Times New Roman';
}

div{
border:1px solid black;
}

</style>

<div>
<h2>
????????</h2>
</div>

Pasting the above codes here: http://htmledit.squarefree.com/ You will see that the text stays a little bit higher in the div in IE than in Chrome, I would like to make them consistent.

By adding a &nbsp; after the text within the <h2>in IE, the text will automatically move up, which is consistent with Chrome. But I don't quite like this hack, so I would like to know if anybody knows what problem this is and recommends a better way to fix it if possible.

Many thanks to you all.

Note: this problem does not appear if the text is english only.

© Stack Overflow or respective owner

Related posts about css

Related posts about cross-browser