View Single Post
Old 03-03-2020, 05:45 PM   #15
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Quote:
Originally Posted by rjwse@aol.com View Post
The code for what you want to do can be much simpler. And I would get rid of the red for sure. If you want just a larger first letter, here is a simple CSS code to do that. I've only named it "dropcap," so I can find it easily in my template file when fixing tons of dropcaps in books that need fixing.

.dropcap {
display: inline;
font-weight: bold;
font-size: 2em;
line-height: 0;
}
__________________
With several of mine you do not have to add anything into the xhtml at all. The CSS puts the dropcap after, say, every H1 and H2. Others of them will put a dropcap after headers, OL, img, etc, as you like. Mine also will pick up initial quotation (but not following superscripts). If the book has a hundred chapters, you don't have to touch the text at all. It's just automatically put in. CSS will not allow a construction such as (h1 ~ p):first-of-type nor does it do 'first-of-class'. There is a proposed code (not yet implemented) called 'initial-letter' (instead of first-letter). It calculates size and drop automatically. Until it comes out combinators rule the day! Best regards, Pop
You still have to enter the H1s and H2s, etc. I find it very easy to use Regex to find and replace all first letters at the beginning of each chapter. I'll keep doing it my way, since it's easier, quicker, and simpler.
deback is offline   Reply With Quote