I have HTML table where the content of the cell is placed using some templating engine.
I have to make sure that the cell should have fixed width no matter how big or small the content is.
<td align="left" height="50px">
<a href="#" style="padding-left:5px; display:block; line-height:18px;">
Traditional Dhow Cruise Dinner in Dubai Creek International Ho...</a>
</td>
case 1: If the content is small(solved).
Then this problem can be solved by having fixed width to the cell.
case 2: If the content is big.
I should make sure all the words that can be fit inside the cell is filled and then after at the end '...' is printed.
I have tried counting the characters in the string used the template engine to place <...> after it exceeds the character count. But this does not seems to be working as HTML breaks a string depending on word. Hence sometimes even my 140 characters(limit) getting exceeded the fixed height of the cell.
I don't mind using any templating engine to generate the desired output. Please help.
Add this to your css