css
table {
width: 100%;
border-collapse: collapse;
}
th, td {
border: 1px solid black;
width: 14.285714286%;
box-sizing: border-box;
}
th {
vertical-align: middle;
}
td {
height: 100px;
vertical-align: top;
padding: 4px;
}
.event-list {
list-style: none;
margin: 0;
padding: 0;
}
.event-list li {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
span.day {
float: right;
font-weight: bold;
}
.other-month .day {
color: #888;
}
td.other-month {
background-color: #eee;
}
body {
font-family: sans-serif;
font-size: 10pt;
}
html
<td class="day-cell current-month"><span class="day">2</span><ul class="event-list"><li>1-4 FM - Fishing</li></ul></td>
I've set the width of each of the table cells to 14.28% but the <li>s push the table cells out even though I have overflow:hidden on them. I don't want the list-items to stretch the cells; I want them to show an ellipsis if the line is to long. Is that possible?