View Single Post
Old 06-25-2025, 07:54 PM   #57
graycyn
Wizard
graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.
 
Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
Quote:
Originally Posted by RbnJrg View Post
If you want a drop-cap, then you don't need the "initial-letter: X;" property; Kindle will build the drop cap for you. Just employ the standard code:

Code:
.noIndent {
   text-indent: 0;
}

.dropCap {
   float: left;
   font-weigth: bold;
   font-size: 3.6em; /* or whatever you want to write here */
   margin: 0 5px 0 0;
}
And in your .xhtml file write something like:

Code:
<p class="noIndent"><span class="dropCap">L</span>orem ipsum...</p>
With that simple code Kindle will format perfectly the drop cap for you. Of course, you also can employ the pseudo-element first-letter:

Code:
p.dropCap {
   text-indent: 0;
}

p.dropCap::first-letter {
   float: left;
   font-weigth: bold;
   font-size: 3.6em; /* or whatever you want to write here */
   margin: 0 5px 0 0;
}
and

Code:
<p class="dropCap">Lorem ipsum...</p>
For accessibility, I'll be using "first-letter," no spans around individual letters, as screen-readers don't always like that, so the chips will have to fall where they may on Kindle. I'm not exactly a natural, nor whiz at this stuff.

The book will look nice enough on Kindle without the drop caps. And I'm not going to get drop caps everywhere anyway unless I employ spans around the individual first letter, so Kindle can live in the vintage ADE boat along with all the other older readers.

The thing I like about initial-letter is it seems to be mostly free of all the trouble I have when reading ebooks that contain drop caps. I've not seen initial-letter dropcaps collapse into tiny dots, nor seen the drop cap disappear entirely!

Besides, just because Kindle doesn't honor initial-letter NOW, doesn't mean it might not get the capability at a future date. A gal can always stay hopeful!

Thanks for your insights though! Very appreciated, it's just that I have to keep things manageable and relatively simple. I can only push the line a little bit as I'm not a natural at this coding stuff. But I am willing to do so to the extent I'm capable.
graycyn is offline   Reply With Quote