Is it possible to disable word wrap for lines within a <div> element so that, unless a <br> is included, the line will just get truncated at the edge of the element rather than flow automatically to the next line?
Hmm, on further investigation, it appears that the <pre> tag will achieve close to what I am after but is there any way of stopping it from switching to a monospace font (Courier)?
On second thoughts, <pre> would appear to be a thing of the past. An alternative approach is to substitute spaces with in any text which should appear unbroken. Also, this approach doesn't mess with the font.
seems to suggest only Netscape and the book I have suggests it is "Nonstandard" and that the "HTML 4.01 specification prefers style sheets for preventing line breaks" though I'm not sure how I'd use a style sheet in this situation.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.