- From: <wendy_lee@agilent.com>
- Date: Mon, 10 Jul 2000 21:46:15 -0600
- To: www-dom@w3.org
Hi, I've set up some HTML pages such that every top-level heading (<H1>) starts printing at the top of a page -- the .CSS file defines <H1> with "page-break-before: always". But, this throws a blank page before every printout (since <H1> is almost always the first paragraph printed). So, I introduced this Javascript, which uses DOM to strip away any leading blank pages from an HTML page: function AdjustPageBreaks() { var TitleCollection = document.all.tags( "H1" ); if( document.body.innerText.indexOf(TitleCollection[0].innerText ) == 0 ) { TitleCollection[0].style.pageBreakBefore = "auto"; } } This works fine in IE5 but not IE4. Can anyone tell me why or suggest something that works in IE4 as well? Thanks, Wendy.
Received on Monday, 10 July 2000 23:46:34 UTC