title: Using CSS and/or jQuery for Printed Pages with Page Breaks
body: <p>I have a dynamically generated html page which is designed to be printed.</p>
  
  <p>I would like to create page breaks based upon div sections - where any given div - if it DOES NOT fully fit on the page, insert a page break before it.</p>
  
  <p>In theory, anywhere from a single div, up to perhaps 10, may fit on a single printed page, so I am thinking I will need to use jQuery to to the insertions after the page is loaded.</p>
  
  <p><strong>If this were a desktop application, I would approach it something like this:</strong></p>
  
  <ol>
  <li>Measure the page width and height (using printer object of some sort).</li>
  <li>Measure each div height - and subtract that from page total remaining height</li>
  <li>if ( remaining_space - div_height > 0 ) { // put it on page } else { //insert page break first }</li>
  </ol>
  
  <p>Is there any way using jQuery, CSS, raw JavaScript, or anything else, that would get me to this scenario?</p>