View Single Post
Old 05-05-2013, 04:37 PM   #8
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
Quote:
Originally Posted by Doitsu View Post
... makes it easy to add dropcaps to ebooks with lots of chapters in them without having to mark the first letter of the paragraph...
Just a variant for multiple chapters (when contained in a single html document):
Code:
h3:nth-child(2n) {
    font-family: sans-serif;
    font-size: 2em;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 2px 2px 3px grey;
    transform: rotate(-3deg);
    -webkit-transform: rotate(-3deg);
}

h3:nth-child(2n+1) {
    font-family: sans-serif;
    font-size: 2em;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 2px 2px 3px grey;
    transform: rotate(3deg);
    -webkit-transform: rotate(3deg);
}

/* paragraph immediately following heading3 */
h3 + p {
    text-indent: 0;
}

p {
    margin: 0;
    text-indent: 1em;
}

/* Small Caps RbnJrg: p:nth-child(2):first-line*/
h3 + p:first-line { 
    font-variant: small-caps;
    font-size:1.2em;
    font-weight: bold;
  }

/* Dropcaps Doitsu p:nth-child(2):first-letter */
h3 + p:first-letter { 
    float: left;
    font-size: 4em;
    font-weight: bold;
    margin-top: -0.2em;
    margin-bottom: -0.2em;
    margin-right: 5px;
  }
Click image for larger version

Name:	screen_shot-53468.gif
Views:	911
Size:	41.5 KB
ID:	105440Click image for larger version

Name:	screen_shot-53469.gif
Views:	910
Size:	42.3 KB
ID:	105441

Thanks for digging more into this Doitsu and RbnJrg. Interesting, if not always reliable. My mileage did vary depending on devices. eReaders manufacturers must like that « The beauty with standards is that there are so many to choose from »
Attached Files
File Type: epub Pseudo Styling First Letter, First Line.epub (3.7 KB, 403 views)

Last edited by PoP; 05-06-2013 at 06:04 AM. Reason: define "chapter"
PoP is offline   Reply With Quote