How to set the minimum number of lines for an element that must be visible at the top of a page in JavaScript?

JavascriptObject Oriented ProgrammingFront End Technology

Use the orphans property in JavaScript to set the minimum number of lines for an element that must be visible at the top of a page. You can try to run the following code to learn how to implement orphans property −

document.getElementById("p").style.orphans

This is how you can return the orphans property −

var res = object.style.orphans;

This is how to set the orphans property −

object.style.orphans='number|initial|inherit'
raja
Published on 27-Feb-2018 12:34:36
Advertisements