Skip to content

Instantly share code, notes, and snippets.

@ryanbattles
Created January 9, 2016 19:22
Show Gist options
  • Save ryanbattles/b7786ce8c3e65edd1868 to your computer and use it in GitHub Desktop.
Save ryanbattles/b7786ce8c3e65edd1868 to your computer and use it in GitHub Desktop.
Custom CSS for Kindle Ebooks
html { text-rendering: optimizeLegibility !important; font-family: georgia, serif; }
h1, h2, h3 { -webkit-hyphens: none !important; font-family: Helvetica, sans-serif; }
h1 { page-break-before: always !important; }
h1, h2, h3, h4, h5, h6 { page-break-after: avoid !important; }
/* p + p { margin:0; text-indent:1.5em; } */
p {
margin-top:1.4em;
margin-bottom:1.4em;
text-align:left;
line-height: 1.4em;
}
li {
line-height: 1.2em;
margin-bottom: .6em;
}
img {
width: 100%;
display: block;
margin: auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment