On Nov 24, 2010, at 9:05 AM, Rory Bernstein wrote:


Is there a way to use CSS to make the first X words of a paragraph be larger? It would have to be done without marking up those words separately. As in:

<p>Here's my paragraph it is short but well written.</p>

I'd need to designate the first X words as being larger automatically.

Thanks,
Rory



oh, BOY!  A question I can answer!!

I did that with <span>, where you surround your lead-in text with span and define your class in your style sheets, like this:


<p><span class="firstline">Here is the lead in sentance.</span>
Here is the rest of the paragraph. Here is the rest of the paragraph. Here is the rest of the paragraph. Here is the rest of the paragraph. Here is the rest of the paragraph. Here is the rest of the paragraph. </p>

.firstline {
        font-size: 150%;
        font-weight: bolder;
}

or something similar...

John

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to