View Single Post
Old 09-12-2022, 03:47 PM   #6
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,589
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by enuddleyarbl View Post
I just wish I could get some inkling of an idea of why these things get "styled" this way.
It's crappy when they use style= in the html. You should be able to use calibre's Convert Books and convert it to the same format, e.g. AZW3 to AZW3 and calibre will get rid of that style= crud.

In the long run I find it quicker and easier to be very heavy handed and delete all of their CSS and replace it with my simplified CSS:

Code:
body {
  font-size: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  width: auto;
}

body * {
  line-height: inherit;
}

p {
  font-size: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  text-indent: 2em;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,h2,h3,h4 {
  text-align: center;
}

.bold {
  font-weight: 900;
}

.italic {
  font-style: italic;
}

.bold_italic {
  font-weight: 900;
  font-style: italic;
}
That makes it ragged right, which I prefer. You could add a text-align:justify; to the body CSS if you like a straight right margin. For novels there's rarely any necessary formatting that this wrecks, aside from stuff that's in italics. So before I nuke the original CSS I look for all classes that specify italic and add them to my .italic class so that it says something like .italic,.calibre3 { where calibre3 was one of the book's classes for italic. Likewise for bold and bold italic. Everything is the same font size which is fine with me; I'm not after a work of art, I just want the story.


When you do this all of your books will have the same font size, line spacing, margins, etc. because it's using the ereader's built in CSS for everything that's not specified here. All of the classes in the HTML are ignored since there's nothing for them in this simplified CSS.
hobnail is offline   Reply With Quote