Forum How do I...?

Dropcap with opening quote

hertling
When laying out book chapters, it's common to use dropcaps. I'm achieving that with PrinceXML by using the following CSS. However, the behavior I get doesn't match what my designer normally does. If they had text that opened with an opening quote, such as "Hello, Tom.", then the opening quote would be normal sized, and the H would be a dropcap. The following CSS enlarges both the opening quote and the H. Is there any way to replicate what my designer does?

p.first-paragraph {
text-indent: 0.0in;
}

p.first-paragraph:first-letter {
float: left;
font-weight: 500;
font-size: 36pt;
line-height: 30pt;
padding-top: 2pt;
padding-right: 4pt;
padding-left: 2pt;
}
mikeday
I think you would need to wrap the first letter in an explicit <span> and style that, as the ::first-letter pseudo-element will always include the opening quote as well.