IT. Expert System.

CSS

white-space


Property Description

The white-space property sets how white-space inside an element is to be handled.

This property has the following syntax:

white-space: normal|nowrap|pre|pre-line|pre-wrap|initial|inherit;

Property Values

Value Description
normal (default) Whitespace sequences will collapse into a single whitespace. Text will wrap as necessary
nowrap Whitespace sequences will collapse into a single whitespace. Text will never wrap to the next line. The text continues on the same line until a <br /> tag is encountered
pre Whitespace is preserved by the browser. Text will only wrap on line breaks
pre-line Whitespace sequences will collapse into a single whitespace. Text will wrap when necessary, and on line breaks
pre-wrap Whitespace is preserved by the browser. Text will wrap when necessary, and on line breaks
initial Specifies that the value of the property should be set to the default value
inherit Specifies that the value of the property should be inherited from the parent element

Examples

The following example shows the basic use of this property:

<div style="border: solid 1px blue; width: 150px; padding: 6px;">

  <p style="white-space: normal;">Some paragraph text
          to demonstrate wrapping</p>
</div>

<br/>

<div style="border: solid 1px blue; width: 150px; padding: 6px;">
  <p style="white-space: nowrap;">Some paragraph text
          to demonstrate wrapping</p>
</div>

        

This produces the following result:

Some paragraph text to demonstrate wrapping


Some paragraph text to demonstrate wrapping


Browser Support

Chrome Firefox IE Safari Opera
1.0 3.5 8.0 3.0 9.5

Miscellaneous Information

Inherited: Yes
Defined In: CSS1
Default Value: normal


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 27 / 158748739. Delta: 0.00365 с