...

View Full Version : :first-letter problem



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

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

this

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'?

drhowarddrfine
05-01-2006, 09: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.

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

Is either possible given my penultimate paragraph?

deltarho
05-02-2006, 12: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. :(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum