View Single Post
Old 12-12-2016, 02:21 AM   #6
fen-sawn
Junior Member
fen-sawn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Dec 2016
Device: kobo touch
Also, for anyone kind enough to reply, my ePub won't justify text on iBooks or ADE.

I'm opening up in calibre edit and trying to imitate other ePubs where you have the option to justify / left align on the kobo (I have a kobo touch mini), and it automatically justify, with the option to left-align in iBooks, but I can't figure it out.

For the 1 to 3 or 4 line gaps at the bottom of my pages, I've been looking at orphans and widows, namely set to 0 or 1, in the CSS, but that isn't working for me, possibly because I'm not doing it correctly.

This is what the CSS for my first chapter looks like. All the "page-break: avoid" and "margin-bottom" commands are earlier failed attempts of mine to knock out the empty lines at the bottom of my pages when viewed on the kobo.

Code:
<style type="text/css">
  p + p {
    text-indent: 2em;
    margin-top: 0;
    padding-top: 0;
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
  }
  p {
    margin-bottom: 0;
    padding-bottom: 0;
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
  }
  h1.chapter-heading {
    text-indent: 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.5em;
    margin-top: 50%;
    margin-bottom: 2em;
  }
  p.star-break {
    margin-top: 1em;
    margin-bottom: 1em;
    text-align: center;
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
  }
  p.star-break + p {
    text-indent: 0;
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
  }
  p + p.star-break {
    text-indent: 0;
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
  }
  p.poem {
    font-size: 75%;
    text-indent: 0;
    padding-left: 2em;
    margin-top: 2em;
    margin-bottom: 2em;
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
  }
  p.poem + p {
    text-indent: 0;
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
  }
  .no-page-breaks {
    page-break-inside: avoid !important;
  }
  </style>
fen-sawn is offline   Reply With Quote