White-space: Nowrap Not Working In Ie 9
I have a table with white-space set to nowrap and columns widths restricted using table-layout fixed. This correctly hides long lines in Firefox, but in IE9 the lines are wrapping.
Solution 1:
Using the strict doctype it works in my IE9, I have the same result as in the firefox. I've tested with the code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body>
<form>
<table border="1" width=200 style="white-space: nowrap; table-layout: fixed;">
<tr>
<td style="overflow: hidden;" width=150>Word with some spaces that isnt working in IE</td>
<td width=50>100/50</td>
</tr>
<tr>
<td style="overflow: hidden;" width=150>LoooooooooOOOOOOOOOoooooooooooooooooongword</td>
<td width=50>550/50</td>
</tr>
<tr>
<td style="overflow: hidden;" width=150>AnotherLoooooooooooonnnnnnnnnnnnnnnnGWord</td>
<td width=50>660/50</td>
</tr>
</table>
</form>
</body>
</html>
Post a Comment for "White-space: Nowrap Not Working In Ie 9"