I would like to limit width of columns in a table.
<!DOCTYPE html>
<style type="text/css">
table tr td {border:1px solid; max-width:2em; overflow:hidden; white-space:nowrap;}
</style>
<table>
<tr><td>this is looooooooo ooooooooo ooooooooooooo ooooooooo ng text</td></tr>
</table>
The next code works well in Firefox (the cell has a limited width), but width is not limited in IE9.
You need to add a div after the td like the following in HTML. Nothing within that
divwill stretch out thetablecell.Demo
Css:
Works great in IE8, Chrome and Firefox.