We would like to know how to keep div on one line and append ellipses.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.my-class-name {<!--from w w w .ja v a 2s. c om-->
white-space: nowrap;
text-overflow: ellipsis;
width: 100px;
overflow: hidden;
}
</style>
</head>
<body>
<div class="my-class-name">Some really long text that I want
gracefully truncated.</div>
</body>
</html>
The code above is rendered as follows: