View Full Version : :first-letter problem

05-01-2006, 08:08 PM
With the following CSS

body:first-letter { font-size: 1.5em; }
p:first-letter { font-size: 1.5em; }


David Roberts<p>Marshall Drive</p> ............. [1]

is rendered as expected ie first letters 'D' and 'M' as 1.5em.

However, if the first 'D' is preceded with <hr> then it loses its 1.5em rendering.

I have tried a stack of 'trial & error' combos but to no avail.

[1], with the <hr>, is a simulation of a web site that I have no control over and the CSS is external via Firefox's site specific feature.

Is is possible to get at that first 'D'?

05-01-2006, 10:03 PM
Because the first letter of the body would then be the <hr> So you have to give your 'David' text a seperate id to make this work or put it in its own container.

05-01-2006, 10:11 PM
Thanks for that.

Is either possible given my penultimate paragraph?

05-02-2006, 01:15 AM
With <hr> preceding David Roberts

hr + * { color: blue; }

gives David Roberts and Marshall Drive remains black.

I should add this is so with Firefox and an external style.

hr + *:first-letter { font-size: 1.5em; } doesn't work. :(