开发者

why width of   is different?

<style>
span {  
font-family: "Fixedsys", "Courier New", Courier, mono, serif;
font-size: 14px;
background-color: #E7E5DC;
}
span{word-spacing:-10px}/*FireFox*/
*html span{word-spacing:0}/*ie6fixed*/
*+html span{word-spacing:0}/*ie7fixed*/
</style>
<div>
<span>IE&nbsp;firefox&nbsp;space&nbsp;width</span>
</div>
<div>
<span>IE firefox space width</span>
</div>

I run code above in FF and IE, line with &nbsp; shows same width space in IE as line with space. but is another story in FF. I want code开发者_开发问答 above to show same width of space, &nbsp; and space, in FF, what should I do?


Try tell you browser about monospace with <code tag. Here is my worked sample:

<style>
span {  
font-family: "Fixedsys", "Courier New", Courier, mono, serif;
font-size: 14px;
background-color: #E7E5DC;
}
</style>
<div>
<code>
<span>IE&nbsp;firefox&nbsp;space&nbsp;width</span>
</div>
<div>
<span>IE firefox space width</span>
</code>
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜