CSS max-lines Property

Description

The max-lines property forces a fragment to break after a specified number of lines. This forces a break after the given number of lines contained within the element or its descendants, as long as those lines are in the same block formatting context.

Initial valuenone

Applies toFragment boxes

InheritedNo

MediaVisual

Computed valueSpecified value

AnimatableNo

CSS VersionCSS3

JavaScript syntaxobject.style.maxLines

Syntax

Formal syntax: none | <integer>

Values

noneBreaks occur only as specified elsewhere.

<integer>In addition to any breaks specified elsewhere, a break is forced before any line that would exceed the given number of lines being placed inside the element. Only positive numbers are allowed.