Quote:
Originally Posted by theducks
(This seems to be my 'Listen to Hitch" day  )
Take some time and 'smell the code'  side of an EPUB you like the look of.
For most part (the main body of text), the basic novel, the code is really simple to style. ((this is called: 'Reverse Engineering" in my real line of work)) I was shocked, when I looked at the code of some of the early books from the "Baen Free Library". "That's it?" about a dozen lines in the style sheet(s) for the novel
All most need, is styles for : First Paragraph
Subsequent paragraphs
New Scene (scene break treatment) The trickier stuff is rare:
stuff like: News Headlines
Signs
Handwritten notes or letters Even that, usually is just another, simple style.
The fun (and this is where I like to play), is Chapter Headings. I like to give the a bit of uniqueness. That is NOT required. You could jus make them bold or a little bigger font (but that is booooring  )
|
Great suggestions.
Something I've started going is using nesting in order to not need class= on so many html elements. For example, for paragraphs I have
Code:
body > p {
text-indent: 1.5em;
}
Then in the html I can use plain unadorned p tags, instead of what I often see, every p element having class="pindent". Then for the paragraphs following an h element I have
Code:
header + p {
text-indent: 0em;
}
So no "pindent" class on those p elements, and the h elements are wrapped in a header element,
Code:
<header class="chapter">
<h2>Chapter 1</h2>
</header>
And I have different css classes for various different types of headers.
Makes for a nice lean and clean html.