CSS - White space property (prevent wrap)

> (World Wide) Web - (W3|WWW) > CSS - Cascading Style Sheets - Markup Language (HTML|XML) Skin

1 - About

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

Advertising

3 - 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.

4 - Example

<td style="white-space:nowrap;">

5 - Documentation / Reference

Advertising
web/css/white_space.txt ยท Last modified: 2019/02/09 11:41 by gerardnico