Hacker News new | past | comments | ask | show | jobs | submit login

Off-topic: is there any CSS that can be added to stop long words like URLs from causing a horizontal scrollbar to appear, i.e. to force the word to be broken in two?



You can have it chop off the end of the URL with "overflow-x: hidden" and an explicit width, but the only way to have it insert a linebreak is to count characters on the server and insert a break manually.


You can use a 'zero width space' (​)in some browsers to hint a breakable point, but it might affect C&P-ability.

Some other discussion of options here:

http://gojomo.blogspot.com/2005/03/cross-browser-invisible-word-break-in.html


Thanks, 200b is was I found too after reading the CSS 2 spec.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: