View Single Post
Old 07-27-2023, 02:14 PM   #28
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,665
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Quoth View Post
I don't think so.
You can create CSS and then use regex to replace the stupid inline styles with the more sensible css Classes.

I suspect this is an old title perhaps made using some mad HTML3 software and a source MS Word with no use of paragraph styles.

Adding spaces won't work. The margins are wrong.

Edit
Replace margin:0.00% 0.00%; globally with nothing, in Sigil or Calibre as that makes no sense.

Replace style=" font-size:1.0rem" with nothing or all .0rem with .0em
Ebooks should never use rem
margins should never be 0.00%, or % at all. They are 0, or a number of em or at worst pt (1em = 12pt)
I'd only ever use % for an image width or an image height, with the other axis as auto. Nothing else should be auto.

azw3 and epub are a subset of HTML5.
Styles shouldn't exist, only CSS class names: Fivre line verse:
<p class="first-line">first line of verse</p>
<p class="verse-body">line of verse</p>
<p class="verse-body">line of verse</p>
<p class="verse-body">line of verse</p>
<p class="last-line">last line of verse</p>

Then the CSS sets top, left, right, bottom margins, text-align, font stuff

Edit
There are loads of ways to do it.
I'll disagree that margins should never be %. I have on instance where it's OK to be % and it's OK to change the size of the content. This is the CSS I use for section breaks.
Code:
hr {
  margin-top: 0.9em;
  margin-right: 40%;
  margin-bottom: 0.9em;
  margin-left: 40%;
  border-top: 2px solid;
}
As to the classes for first-line and last-line, get rid of them. Use a <blockquote> instead and just use the same class as the other lines.
JSWolf is offline   Reply With Quote