View Single Post
Old 05-08-2009, 12:01 PM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Just to comment on the drop cap code:

It may be desirable to add:

Code:
p.initial + p {
  clear: left;
}
To force the second paragraph to start below the drop cap, when the first paragraph is short.

The "white-space: pre;" part of span.first is needed for cases where there is a space between the drop cap and the start of the line, as in "<span class="drop">A</span><span class="first afterA"> day after</span>", since otherwise the space beginning the span.first is dropped (take care with linebreaks inside this span.first).

A similar "afterL" class can be needed. If the drop cap is not A or L, use only class="first".

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;
Jellby is offline   Reply With Quote