Alex Rivera | Logout

How to turn off word wrapping in HTML?

Asked 2011-01-10T23:19:32.980
649

I feel silly for not being able to figure this out, but how do I turn off wordwrap? the css word-wrap property can be forced on with break-word, but cannot be forced off (only can be left alone with normal value).

How do I force word wrap off?

Edit
Report

1 Answer

1036

You need to use the CSS white-space attribute.

In particular, white-space: nowrap and white-space: pre are the most commonly used values. The first one seems to be what you 're after.

answered 2011-01-10T23:21:08.663

Your Answer