Motivated by the length of the recent title "Why are other popular languages very different from Perl when installing libraries, e.g. no testing needed and no compilation of C/C++ code done" I did some experimenting and came up with the following CSS which cuts off long node titles at a predefined width in the Recent Threads view (my issue here is that with titles wrapping, the layout looks somewhat "messed up" (for my taste), which makes it unnecessarily hard to tell signal from noise...).
a.nnt-link { max-width: 50em; display: block; float: left; margin-right: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
The float:left kind of "undoes" the display:block, which is only required because max-width wouldn't work with "inline"-layouted elements. The text-overflow: ellipsis - which is supposed to put "..." at the end to indicate the text has been cut off - doesn't seem to work with Firefox, but IIRC it should work with some other browsers (can't test at the moment).
The hack has the "works for me" status, which means I haven't tested it with any other browsers/themes/window widths etc. than what matters for me (using FF / the "Perl-Blue" theme). In other words, it might not work for you.
Anyhow, just wanted to share it as a starting point for others — just in case I'm not the only one feeling mildly annoyed by people putting half of their node content in the title ;)
Improvements or alternatives welcome. Cheers
In reply to CSS to trim overly long node titles by Eliya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |