Hello!
I am struggling to find the right HTML coding to do what I want here.
I have a simple two row HTML table. It gets data from a gallery which is tied to a SharePoint list.
Code is as follows:
<table style='
color:#003A70;
font-size:16px;
width:820px;'>
<tr>
<td>
<b>To " & ThisItem.Individual.DisplayName & "<font size=2pt'></b><i> on " & Text(ThisItem.Created,DateTimeFormat.LongDate) & "
<tr>
<td style='
font-size:15px;
padding-left:20px;'>" &
ThisItem.Message
For entries where the "Message" field is long, it produces this scroll bar in the gallery.
I'm trying to get it to just cut off any vertical overflow with an ellipsis ("...") - so, show the lines that would be visible, but instead of a scrollbar to view the rest, just cut it off with an ellipsis on the last visible row.
Is this possible?
I've done some searching and people have suggesting some code like this to limit the message to X characters and append "..." but this isn't very effective as length of a string is not the same as the horizontal length (letter width differences, etc) and this results in inconsistent formatting in the gallery displaying the data
If(Len(ThisItem.Message) > 100, Left(ThisItem.Message, 100) & "...", ThisItem.Message)
Update*
I managed to figure it out by updating the TD tag.
<td style='
font-size:15px;
padding-left:20px;
display:
-webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;'>" &
ThisItem.Message

Report
All responses (
Answers (