
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set Minimum Number of Lines at Bottom of Page with JavaScript
Use the orphans property in JavaScript to set the minimum number of lines for an element that should be left at the bottom of a page when a page break occurs inside an element with JavaScript.
You can return the orphans property like this −
var res = object.style.orphans
Set the orphans property like this −
object.style.orphans = 'number|initial|inherit'
The following are the property values shown above −
- number − Specify the minimum number of visible lines.
- Initial − Set property to its default
- Inherit − Inherits property from the parent element
Advertisements