Entry
How can I stop text from wrapping in a browser?
Jul 7th, 1999 08:02
Erik Johansson, Nathan Wallace,
Try using the HTML <pre> tags. Anything between them will be shown in
the browser with the exact formatting (including line breaks) that you
specify.
If you want something in the middle of a sentence to be nonwrappable
then use &nsbp; instead of a space.
A Netscape/IE specific tag is <nobr>, this will let you make a whole
sentence be nonwrappable, beware though this isn't in the HTML4
standard (should work anyway).
<?php
echo "<pre>This won't wrap...</pre>";
echo "This won't wrap
echo "<nobr>This won't wrap</nobr>
?>