Quote:
Originally Posted by brent63
The problem is I'm also using using first line indent.
So even the first line of the Dropcap is indented, not a very good look. (see attachment)
How can I remove it from the the first line only.
|
This is a useful trick:
Code:
p {
margin:1em 0 0 0;
text-align:justify;
text-indent:0;
}
p+p {
text-indent:1.4em;
margin:0;
}
The first block defines the first p para in a section (e.g. after a heading tag.)
The p+p defines any subsequent p paragraphs -- how they differ from the first.
Here, the first para in a section has a top margin and is flush left, then following no margins with indent.
You'd use it like
Code:
<p><span="Drop">T</span>his is the first para.</p>
<p>And this is the second</p>
Otherwise, you define a new style for the first para:
Code:
p {text-align:justify;
text-indent:1.4em;
margin:0;
}
p.first {
margin:1em 0 0 0;
text-indent:0;
}
Code:
<p class="first"><span="Drop">T</span>his is the first para.</p>
<p>And this is the second</p>
This is how I usually do it, since my books start as conversions from a DTP file and in that the styles do not cascade, each is defined individually, so I map a DTP style to a HTML style.
I prefer to make the plain p style indented, as that's what 99% of most books is, using styles for the special cases.