Skip to content

Instantly share code, notes, and snippets.

@nchapman
Created December 1, 2011 21:44
Show Gist options
  • Save nchapman/1420115 to your computer and use it in GitHub Desktop.
Save nchapman/1420115 to your computer and use it in GitHub Desktop.
Overflowing tables
<!DOCTYPE html>
<html>
<head>
<style>
table {
border: 1px solid #555;
table-layout: fixed;
width: 100%;
}
td {
border: 1px solid #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.a, .c, .d {
width: 80px;
}
</style>
</head>
<body>
<table>
<tr>
<td class="a">aaaaaaaaa</td>
<td class="b">bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</td>
<td class="c">cccccccccc</td>
<td class="d">ddddddddd</td>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment