I have a div, but when the text inside it is too long, it will wrap and make the div a few lines. This makes the page bad. How can I avoid text in a div not wrap?
There is a reason the test wraps around. But if you don’t care, then you set the overflow style to visible and set the style style="white-space: nowrap;"as well
style="white-space: nowrap;"
The answer depends on the desired result. If you SHOULD keep the div size fixed by sacrificing some visible text that does not fit, use width, heightand overflow: hidden, otherwise, you will use white-space: nowrapas suggested.
width
height
overflow: hidden
white-space: nowrap
Source: https://habr.com/ru/post/1792995/More articles:Updated static field for members; consultation needed - c #Books for experienced developers - oopC: Any way to convert a text string to float, i.e. 1e100? - cWhat is a good algorithm to protect the kingdom? - c ++Как открыть файл программно с помощью EnvDTE в С# - c#How to display strings in WPF ListView in different colors? - listviewWhat is the meaning of this SQL statement? - sqlJavascript Iteration Error - Variable Variable - javascriptfrom new classobj import in Python 3.1 - pythonWhere did the language “I” come from? - programming-languages | fooobar.comAll Articles