http://www.perlmonks.org?node_id=94620


in reply to Re: Splitting A Word?
in thread Splitting A Word?

no, usually the browser will expand the table to fit the text in it if there are really long words. that's the problem mpegman seems to be having. eg,

<table width="2" border="1"> <tr><td>looooooooooooooong</td></tr> </table>

gives you:

looooooooooooooong

certainly not 2 pixels wide.

if you're working on a more liquid layout, you could modify one of the regexps given to substitute in a <wbr /> tag instead of a space. that tells the browser that if it needs to wrap text, that's a good spot to do it in. but if it doesn't need to wrap the text, you won't end up with a space in the middle of the word.

anders pearson