Using
white-space: nowrap;
for an element containing text.
The name is pretty clear - it makes spaces not wrapped.
Use overflow: hidden;
if you do not want the text to exit the window in which it should have been.
Use text-overflow: ellipsis;
if you want to use ellipsis when text overflows the bounding box.
Jsfiddle

source
share