Quote:
Originally Posted by Turtle91
I agree you can't quite do what you want. The only thing you could do is set your :first-line attribute and then have a minimum number of words (in this example 4) that would be emphasized regardless of the reader's support of the pseudo selector. If the font was so large - or the screen so small - that only 3 words fit on the first line, the 4th word would still be emphasized on the second line. But that would be a pretty extreme situation to only fit 3 words on a line.
eg.
CSS
h1 + p {text-indent:0}
h1 + p:firstline {font-style:italic}
em {font-style:italic}
HTML
<h1>Heading Line</h1>
<p><em>The first four words</em> are italic on non-supportive devices. The entire first line is italic on supportive devices.</p>
-OR-
h1 + p {text-indent:0}
h1 + p:firstline {font-variant:small-caps}
.smcap {font-variant:small-caps}
<h1>Heading Line</h1>
<p><span class="smcap">The first four words</span> are smallcaps on non-supportive devices. The entire first line is smallcaps on supportive devices.</p>
|
Incorrect! The first four words are not smallcaps as ADE does not support smallcaps as a font variant. So it won't work. All you'll is the first paragraph with ALL the words in the same format.