We would like to know how to set div width in TD in table cell.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {<!--from w ww.j a v a 2 s .c o m-->
overflow: hidden;
text-overflow: ellipsis;
width: 100px;
}
td {
white-space: nowrap;
}
</style>
</head>
<body>
<table>
<tr>
<td>
<div>Here is plenty of text to cut</div>
</td>
</tr>
</table>
</body>
</html>
The code above is rendered as follows: