View Single Post
Old 11-06-2009, 06:54 PM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by Jellby View Post
When there is some punctuation before the drop cap, this code may be useful:

Code:
span.predrop {
  font-size: 25%;
  font-weight: normal;
  vertical-align: top;
  line-height: 1.9;
}
use it with:

Code:
<span class="drop"><span class="predrop">&lsquo;</span>I</span><span class="first"> was</span> never so upset in my life!&rsquo;
I've been experimenting with this code (testing it in ADE), and found it was causing the dropcap to be shifted over to the right for some reason I can't fathom. I finally fixed it by adding a margin-left correction:
Code:
span.predrop {
  font-size: 25%;
  font-weight: normal;
  vertical-align: top;
  line-height: 1.9;
  margin-left: -0.5em
}
This is for a dropcap on lines that start with a quotemark. If I remove the quote and the predrop code so that the dropcap is a single character, then it works fine and is aligned properly. If I add just the quotemark (so the dropcap span is
Code:
<span class="drop">&lsquo;I</span>
)
then the left margin of the dropcap region shifts over to the right by about 0.5em. Adding the predrop span as originally coded doesn't change this, though it aligns properly when I add the margin-left correction.

My familiarity with CSS is stilll somewhat rudimentary, so I wonder if there's something I'm missing here, though it works right now.
charleski is offline   Reply With Quote