Show hidden text during find

Spread the love

Question Description

I have a table of data with several columns. One of them is a comment column with varying length of text. Some comment is very short but some of them can be quite long. Now I only display the first 50 characters of the comment and I put the original text into the “title” attribute so that users still able to read the whole value.

By truncating the string the table looks okay but now users are not able find (CTRL+F in browsers) anything in the rest of the text that was truncated.

So my idea is to make the whole comment hidden in the source code but visible to the browser’s find mechanism. Is it possible somehow? What do you guys suggest?


Practice As Follows

Simple/funny solution:

Set the comment container CSS to overflow:hidden; or overflow:scroll;, and set width and height for the container if necessary. Should show only a portion of text for the users, but can be fully-readable by the browser.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.