CSS widows property

CSS widows Property

Description

In paged media, the widows property is used to control line wrapping by specifying the minimum number of lines that should remain at the top of a paragraph.

Possible Values

  • integer − Any length unit. Negative length values ​​are not allowed for this property.

Applies to

All block-level elements.

DOM Syntax

object.style.widows = "5"; 

Example

Here is an example of creating 4 rows at the bottom of each page and 3 rows at the top of each page –


<style type = "text/css"> 
<!-- 
@page{orphans:4; widows:2;} 
--> 
</style> 

Leave a Reply

Your email address will not be published. Required fields are marked *