Thread: :firstletter
View Single Post
Old 12-07-2014, 08:16 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
:firstletter

Hi

Some years ago, if I remember, ADE 1.7. did not agree with :firstletter. It seems it now can use it.

So, imagine a book with h1 chapters. I wish to insert some dropcaps.
Code:
h1 + p {color:red;}
paints the first paragraph following a h1 title in red.

Code:
.firstletter:first-letter {color:red;}
does the same trick for the first letter of a paragraph.

Question: I would like to insert a CSS code which gives a
Code:
class="firstletter"
to the first paragraph of each h1 title. Or maybe I need a regex for that? I am confused.

Last edited by roger64; 12-07-2014 at 08:51 AM. Reason: code
roger64 is offline   Reply With Quote