Using div instead of P for paragraphs is strange. I don't know what this line in the stylesheet.CSS does:
Code:
page-break-inside: avoid;
But when I removed them all from the css file, what I believe you were seeing went away. It appeared to keep the divisions used for paragraph creation from being split between pages. This effectively meant no paragraph could split between pages. So you ended up with massive gaps because the next paragraph was too big to fit on the page and had to start on a new page.
Update: I
looked up what it does and I described it accurately. One use is to avoid page break inside the paragraph.