I have some text that I do not wish to wrap to a second a line. I tried placing this in a DIV tag and setting a width and overflow:auto, however, this will cause a scroll when the width of the DIV is greater than its container (the browser window).
If I only have 3 characters I do not want a scrollbar. I only want a scrollbar when the text is long enough to exceed the width of the DIV.
Basically I'm trying to make it so the text never wraps. Assume this simple page:
The page will be almost as simple as that above and I basically want to make sure that the sentence never wraps (no matter what length as this sentence is dynamically generate and will be of a variable length). I only want a scrollbar if the browser window clips the text. Any help is appreciated. Thank you.
If I only have 3 characters I do not want a scrollbar. I only want a scrollbar when the text is long enough to exceed the width of the DIV.
Basically I'm trying to make it so the text never wraps. Assume this simple page:
Code:
<body>
I do not want this sentence to ever wrap to the second line, but only want scrollbars if the browser window clips the text
</body>
The page will be almost as simple as that above and I basically want to make sure that the sentence never wraps (no matter what length as this sentence is dynamically generate and will be of a variable length). I only want a scrollbar if the browser window clips the text. Any help is appreciated. Thank you.