How can I truncate table cells, but fit as much as content possible?

Meet Fred. He’s a table: <table border=”1″ style=”width: 100%;”> <tr> <td>This cells has more content</td> <td>Less content here</td> </tr> </table> Fred’s apartment has a bizarre habit of changing size, so he’s learned to hide some of his content so as not to push all the other units over and shove Mrs. Whitford’s living room off … Read more

CSS text-overflow: ellipsis; not working?

I don’t know why this simple CSS isn’t working… .app a { height: 18px; width: 140px; padding: 0; overflow: hidden; position: relative; margin: 0 5px 0 5px; text-align: center; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; color: #000; } <div class=”app”> <a href=””>Test Test Test Test Test Test</a> </div> Should cut off around the 4th “Test” … Read more

CSS overflow-x: visible; and overflow-y: hidden; causing scrollbar issue

Suppose you have some style and the markup: ul { white-space: nowrap; overflow-x: visible; overflow-y: hidden; /* added width so it would work in the snippet */ width: 100px; } li { display: inline-block; } <div> <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> <li>9</li> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> <li>9</li> … Read more