The css code to force text not to wrap is "div{white-space:nowrap;}", in which the white-space attribute sets how to handle whitespace within the element, and the attribute value normal causes the whitespace to be ignored by the browser.
Recommended: "css video tutorial"
This method is suitable for any brand computer.
css enforces text not to wrap. Code
Forcing text not to wrap, just use white-space:nowrap.
CSS settings do not convert:
overflow:hidden
hidden
white-space: normal
Default
pre
Newlines and other 1653 whitespace characters will be protected
nowrap
Force all text to be displayed on the same line until the end of the text or encounter
br
Object
Example, force no line breaks
The code is as follows
div{ white-space:nowrap; }
The above is the detailed content of What is the css code to force text not to wrap?. For more information, please follow other related articles on the PHP Chinese website!