Menu Home

overflow-wrap

osbo.com | CSS | Properties | overflow-wrap

The overflow-wrap CSS property specifies whether the user agent may break at otherwise disallowed points within a line to prevent overflow, when an otherwise-unbreakable string is too long to fit within the line box.

Syntax

CSS

overflow-wrap: value;

JS

object.style.overflowWrap = "value";

Values

<'overflow-wrap'> = normal | break-word | anywhere
normal

Lines may break only at allowed break points.

break-word

As for anywhere except soft wrap opportunities introduced by break-word are not considered when calculating min-content intrinsic sizes.

anywhere

An otherwise unbreakable sequence of characters may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line.

Initial

normal

Examples

normal

break-word

anywhere

JS

Internal

hyphens

line-break

word-break

word-wrap

External

World Wide Web Consortium (W3C)