Here is a code:
<!DOCTYPE html>
<html>
<head>
<style>
li div {
border: 1px solid #FF0000;
width: 100px;
position:relative;
white-space: nowrap;
overflow: hidden;
}
</style>
</head>
<body>
<ol>
<li>
<div>111111111111111111111</div>
</li>
<li>
<div>222222222222222222222</div>
</li>
</ol>
</body>
</html>
The page is displayed not as expected in IE8.
Firefox: (OK)

IE8: (wrong)

Could somebody explain why?
If remove <!DOCTYPE html> everything will be ok, but I want to find the reason and fix it via CSS.
You can add position relative to ‘li’ tag and change position relative to absolute for ‘div’ tag and add ‘top: 0; left: 0;‘ to div tag.this will work fine.
Try this css: