View Single Post
Old 07-31-2015, 12:55 PM   #7
ButWhy
Junior Member
ButWhy began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2015
Device: EPUB & MOBI
Quote:
Originally Posted by Section8 View Post
I don't know about the Nook android app, but Nook devices have an old bug and ignore the short-hand CSS "margin" rule ("margin: a b c d;" and friends) based on the "publisher formatting" option (I don't remember which way experiences the bug).

The work around is to convert all "margin" css rules to the equivalent margin-top, margin-right, etc. rules. Somewhere in the calibre conversion settings there is an "expand css" option (or something like that) that does this in the css during conversion. When I was reading on a NST, I had some saved regexes in Sigil that did this.
The shorthand might have contributed to the problem. I did (and still do) have declarations for p that include "margin: 0;" with classes for styling things like the first paragraph of each chapter along with some stylized epigraph stuff. In those p-class declarations, I did not use shorthand. I specified only margin-bottom or margin-top on those; never both.

It made no difference whether I flipped the Nook-for-Android publisher formatting slider or not; no space rendered using margin-bottom or margin-top.

I did, however, try mucking around with this in a bunch of different ways. I removed the p declaration entirely. Just for shiggles, I tried changing <p>'s to <div>'s. No change—the spaces would not render at all until I changed margin to padding.

In the back of my mind I have this fear that the change I made will break this book for some other device/app, or for EPUB3.

Why do we love this stuff, again?
ButWhy is offline   Reply With Quote