3 replies [Last post]
JustinYoung
JustinYoung's picture
Offline
newbie
Last seen: 12 years 10 weeks ago
Timezone: GMT+8
Joined: 2008-09-12
Posts: 2
Points: 2

the bug:

the code:

<!DOCTYPE html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>bug page</title>
	<style type="text/css">
	#bigBox{
		width:300px;
		height:300px;
		border:1px solid red;
	}
	#articleList li a{
		display:block;
		width:100%;
		height:1.2em;
		overflow:hidden;	
	}
	</style>
</head>
<body>
<div id="bigBox">
	<p>this is a article list.I want "overflow:hidden" the long long long long sentence. </p>
	<ul id="articleList">
		<li><a href="#" title="">this is a long sentence this is a long sentence this is a long sentence</a></li>
		<li><a href="#" title="">this is a long sentence this is a long sentence this is a long sentence</a></li>
		<li><a href="#" title="">this is a long sentence this is a long sentence this is a long sentence</a></li>
		<li><a href="#" title="">this is a long sentence this is a long sentence this is a long sentence</a></li>
		<li><a href="#" title="">this is a long sentence this is a long sentence this is a long sentence</a></li>
	</ul>
</div>
</body>
</html>

help
How to fix this bug in IE8?

DanA
DanA's picture
Offline
Elder
Last seen: 11 years 37 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

Try #articleList li

Try
#articleList li a{
display:inline-block;
instead of
display:block;

jameshopkins
Offline
newbie
Last seen: 12 years 9 weeks ago
Joined: 2009-07-08
Posts: 3
Points: 2

An example of a recognised IE8 bug

The issue you've stumbled across is in fact a bug that I logged some time ago. Indeed changing the 'display' value to 'inline-block' fixes the issue. Just remember to add a fallback value for versions below IE8.

jameshopkins
Offline
newbie
Last seen: 12 years 9 weeks ago
Joined: 2009-07-08
Posts: 3
Points: 2

An example of a recognised IE8 bug

Somehow managed to double-post :S