开发者

How does Gmail hide their Subject line overflow?

开发者 https://www.devze.com 2023-02-16 15:54 出处:网络
How doe开发者_JAVA百科s Gmail hide/clip/truncate their Subject line overflow? It\'s not just as simple overflow:hidden because I\'ve tried all that.It must be something elaborate.

How doe开发者_JAVA百科s Gmail hide/clip/truncate their Subject line overflow?

It's not just as simple overflow:hidden because I've tried all that. It must be something elaborate.

The width of the table is 100% and NOT fixed-width and the table-layout is NOT "fixed" so the solution can't use that either. Only one column stretches and the rest are fixed-width. I've tried everything I could find on the web they all cheat with table-layout="fixed".


Oh they put a div in the cell with overflow: hidden;, and then the subject in that.

I've done it myself in a site; a snippet:

html:

<td class="vtc"><div>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div></td>

css:

.vtc {
    width: 144px;
    height: 16px;
    line-height: 16px;
    text-indent: 10px;
}

.vtc div {
    overflow: hidden;
    height: 16px;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消