CSS - White space property (prevent wrap)

About

The white-space prevent the text to wrap up in a second line.

Usage

Value:  	normal | pre | nowrap | pre-wrap | pre-line | inherit
Initial:  	normal
Applies to:  	all elements
Inherited:  	yes
Percentages:  	N/A
Computed value:  	as specified 

where:

Values have the following meanings:

  • normal (default): collapse sequences of white space, and break lines as necessary to fill line boxes.
  • pre: prevents from collapsing sequences of white space. Lines are only broken at preserved newline characters.
  • nowrap: This value collapses white space as for 'normal', but suppresses line breaks within text.
  • pre-wrap: prevents from collapsing sequences of white space. Lines are broken at preserved newline characters, and as necessary to fill line boxes.
  • pre-line: collapse sequences of white space. Lines are broken at preserved newline characters, and as necessary to fill line boxes.

Example

  • On a cell
<td style="white-space:nowrap;">
  • In a div …
<td><div style="white-space:nowrap;"></div></td>

Documentation / Reference





Discover More
CSS - Anonymous Inline Box

Any text that is directly contained inside a block container element (not inside an inline element) must be treated as an anonymous inline element. Anonymous inline boxes do not have an associated inline-level...
Boxdim
CSS - Width property (of a box)

The width property specifies the width of boxes and it's calculation is defined by the box sizing property. HTMLCSS HTML width attributeHTMLimgiframe... If you want to set a width on a p element for...
Card Puncher Data Processing
Datacadamia - Data all the things

Computer science from a data perspective
Firebug Layout
HTML - Layout

layout float with div table html5
Obiee Css Width None
OBIEE - Cosmetic Formatting (Style, Css)

Cosmetic formatting is independent of a condition whereas a Conditional Formatting is dependent of a condition. To suppress the inheritance of the default 100% width property of the dashboard...



Share this page:
Follow us:
Task Runner