Limiting amount of text visible in a column
See original GitHub issueHow can I limit the amount of text shown in a column? My form allows users to enter up to 1024 characters in a Remarks field which I can use CSS styling elsewhere on an input field to add an ellipsis (…) before overflowing (hidden). Can I do something similar with a table column?
This is what it looks like now:
This is what I’d like to do:
I use CSS like this on my input fields:
.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
I don’t think the data-width attribute is sufficient, and I can’t trim the text as the field includes HTML markup and I don’t want to lose any formatting tags.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
How to limit characters length in a cell in Excel? - ExtendOffice
Use text to column, choose fixed width and choose the character count you want. It will separate antything above the limit to a...
Read more >Limit Amount of Text Displayed to be the Same as the Column ...
Right Click the cells > Format Cells > Alignment tab > Horizontal drop down menu and change it from General to Fill. That...
Read more >Excel 2007 -- limit on text displayed in a single cell?
The Column width of an Excel 2007 cell is a maximum of 255 characters but the Total number of characters that a cell...
Read more >HTML text display Limit for table column - css - Stack Overflow
Since the word-wrap needs some block level element, you need at least to set the TD with display:inline-block .
Read more >SQL Server - Using TEXTSIZE to limit the display Select ...
My students sometimes ask me how they might limit the amount of text displayed in large text columns, like nvarchar(max), for example.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Does make sense.
Just question a search enginge for CSS solutions, they are similar:
Google “css ellipsis table cell”
W3C Answer
Thanks! I’ll try using a range like you suggested.