View Single Post
Old 02-11-2020, 04:42 PM   #14
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: 79,796
Karma: 146391129
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 rjwse@aol.com View Post
<style>
dropcap, h1 ~ p:first-of-type:first-letter, h2 + p:first-letter, h2 + img + p:first-letter, h2 + img + img + p:first-letter {
color: red;
font-size: 2em;
line-height: 1em;
float: none;
/*float:none makes TALLcap*/}
dropcap, h1 + p, h2 + p, h1 + img + p, h2 + img + p, h2 + img + img + p {
text-indent: 0;}</style>

The above works good for me. I put the dummy word 'dropcap' first to alphabetize the css. The 'text-indent:0;' makes the first paragraph of a chapter nonindented for the dropcap. I inserted 'img' in between 'h1' and 'p' because quite often I want a dropcap after an h1 which is followed by an image, then a p. This method automatically takes care of any double-quote starting the first paragraph. I prefer a TALLcap to a DROPcap, but it is a one word change. You can add h3 etc. if necessary. With this method you do not have to do anything at all in the text itself. Best regards, Pop
That's not a dropcap. It's a raised cap. Depending no how larger the raised cap is, it may not look good on a Kindle eBook.
JSWolf is offline   Reply With Quote