How does Gmail hide Subject theme overflow?

How does Gmail hide / trim / crop Subject line overflow?

This is not just a simple overflow: hidden because I tried it all. It must be something complicated.

The table width is 100% and NOT a fixed width, and the layout table is NOT "fixed", so the solution also cannot use this. Only one column is stretched, and the rest is a fixed width. I tried everything I could find on the Internet, they all fool with table-layout = "fixed".

+4
source share
1 answer

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

I did it myself on the site; fragment:

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; } 
+5
source

Source: https://habr.com/ru/post/1343240/


All Articles