View Single Post
Old 06-26-2025, 03:13 AM   #58
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,070
Karma: 147983159
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 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>
With your first code for the Kindle, will you get a perfect dropcap when using ChareInk6SP as the font wiyh KF8? The font uses a smaller line height that works in KF8 but not KFX.
JSWolf is offline   Reply With Quote