View Full Version : word break error in epub

12-01-2009, 08:52 AM
I have just got a couple of ebooks, created by the same person. One of them displays correctly on readers and in Sigil the other one is constantly breaking words instead of moving to the next line. It does this both in a reader and in Sigil so I assumed it was something in the CSS.

The code is the same for both books <style type="text/css">
body.sgc-5 {word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;}
p.sgc-4 {text-align: center;}
span.sgc-3 {font-weight: bold;}
h3.sgc-2 {text-align: center; color: rgb(79,79,79);}
h1.sgc-1 {text-align: center; color: rgb(70,130,180);}

img.sgc-6 {height: 100%}
The body line looks, to my untrained eye, to be incorrect, but the display of one ebook is OK with that line in.

The body of the ebook is formatted with <p> </p> tags around paragraphs, the same in both books.

Any suggestions as to why one is splitting words and the other is not?

12-01-2009, 09:21 AM
Do they both use <body class="sgc-5"> at the beginning of the body section of the (x)html files?

12-01-2009, 09:45 AM
Neither book has any entry for class=sgc-5 anywhere in the body section, one of the reasons I thought there might be an error with that line. Deleting that line from both books makes no difference, one still breaks words and the other does not.