In CSS, how do I make the text not go on a 2nd line?

css, templates

Solution

Use white-space:

#myDiv { white-space: nowrap; }

Or:

<div style="white-space: nowrap;">Long text that I do not want wrapped</div>

Problem

Suppose I have text inside a div right now. When I resize my browser to make it really small, the text goes on a 2nd line instead of making the scroll bar. Instead, I would like to keep the text all on one line and just have a horizontal scroll bar. How can I do this? WIth overflow?

Original source