Reputation: 309
I encountered a strange bug in IE8.My page like this below:
<!DOCTYPE HTML>
<html>
<head>
<meta charset='utf-8'>
<title>IE8 bug</title>
</head>
<body>
<div class='content'>
<a class='inner-text'>你好hello world</a>
<a class='wid' >ssss</a>
</div>
</body>
<style type='text/css'>
.wid{
border: 1px solid red;
}
.content{
position: fixed;
}
.inner-text{
display: inline-block;
}
</style>
</html>
The bug is that the 'ssss' will cover part of the '你好hello world',and it appears conditions are these:
1) .content must be positioned fixed or absolute;
2) set .inner-text's display inline-block and it's innerHTML must contain non-ascii letters;
3)There must be DTD;
I got some solutions.one is change the '你好hello world' to '你 好 hello world'.But I want some better solutions,would you like to help me?
Upvotes: 0
Views: 67
Reputation: 8338
I'm finding that this is only in native IE8, and it non-ascii didn't make a difference for me.
With the styles you set I see this:
If I remove .inner-text { display: inline-block; }
it fixes:
And if you have .wid { display: inline-block; }
as well as the .inner-text { display: inline-block; }
it also fixes.
Finally, a last image to show it still broke without the characters.
Upvotes: 2