Eh, his website needs work. The text overflows the white box and he must've used the nowrap attribute as there is a hideous amount of rightwards scrolling. pls fix ur website b4 u sho it to teh whirled, pls ok tks.
Ouch. F U 2.
I like three-column designs, so I lay out my sites with HTML tables, often putting ads in the rightmost column. This lends itself to a creative trick some cranks like to employ -- putting a really long word in a comment to hose my layout and push ads way off the page, depriving me of money I need to put food on my family.
I'm currently moving the 14,000 weblog entries and 232,000 comments on the Drudge Retort from Movable Type to my Wordzilla PHP/MySQL software, so I wanted to solve this long-word problem.
I can't use PHP's wordwrap() function, which breaks long words that exceed a set maximum, because my weblog comments include hyperlinks. Any URL longer than the maximum would be broken.
I found a nice open source PHP script by Brian Huisman, htmlwrap, that solves this problem:
htmlwrap() is a function which wraps HTML by breaking long words and preventing them from damaging your layout. This function will NOT insert br tags every "width" characters as in the PHP wordwrap() function. HTML wraps automatically, so this function only ensures wrapping at "width" characters is possible. Use in places where a page will accept user input in order to create HTML output like in forums or blog comments.