View Full Version : Why are my ePubs "Block protected"?


MacEachaidh
06-05-2011, 06:40 PM
Can anyone help me understand what's happening here, please?

My reader seems to have a habit where, if a paragraph won't fit entirely on the screen, it inserts a soft page break and pushes the para over to the next screen. It means the bottom third to half of the screen is often blank. I'd rather it simply went to the bottom and then broke to the next page, like a printed book does.

But where's this behaviour coming from? I can't find anything in the CSS code that does it - does such a thing even exist in CSS? - but my reader uses ADE to display books, so is it one of those hard-coded secret behaviours in ADE?

JSWolf
06-05-2011, 07:18 PM
But where's this behaviour coming from? I can't find anything in the CSS code that does it - does such a thing even exist in CSS? - but my reader uses ADE to display books, so is it one of those hard-coded secret behaviours in ADE?

The behavior is actually coming from ADE. By default ADE uses a widow & orphan of 2 so a paragraph has to conform that that or it drops to the top of the next page.

There is a very simple way around it. Put the following into the body element in the CSS...

widows: 0;
orphans: 0;

That will give you just what you want. I do it all the time.

In fact, here is one of the body elements I use...

body {
font-family: "Charis SIL", serif;
widows: 0;
orphans: 0;
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
text-align: justify;
font-size: 95%
}

MacEachaidh
06-05-2011, 07:34 PM
Fantastic! Thanks, JSWolf.

JSWolf
06-05-2011, 08:41 PM
Fantastic! Thanks, JSWolf.

Happy to help.

Jellby
06-06-2011, 05:08 AM
JSWolf's explanation is good if you are seeing only 1-2 blank "lines" at the bottom of a screen. However, I believe what you are seeing is a different quirk of ADE, when a paragraph is very long, it just gets pushed to a new page, and in some cases you can even see a pagebreak in the middle of a long paragraph. This behaviour is not controlled by CSS, and it's probably just a limitation of ADE.

JSWolf
06-07-2011, 06:18 PM
JSWolf's explanation is good if you are seeing only 1-2 blank "lines" at the bottom of a screen. However, I believe what you are seeing is a different quirk of ADE, when a paragraph is very long, it just gets pushed to a new page, and in some cases you can even see a pagebreak in the middle of a long paragraph. This behaviour is not controlled by CSS, and it's probably just a limitation of ADE.

When I've set widows and orphans to 0, I've not seen a problem with the end of the screen page. So I suggest setting widows and orphans to 0 and the problem may go away.