Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show hidden text during find

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?

Thanks!

like image 443
papaiatis Avatar asked Jul 03 '12 14:07

papaiatis


1 Answers

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.

like image 180
evilReiko Avatar answered Oct 14 '22 21:10

evilReiko