Thanks, John. That would be a great solution for most cases, but I need to NOT
have a span that wraps around the bigger text. No extra markup other than the
<p> tags. I need the CSS (perhaps with the help of javascript?) to pick out X
words, and style them bigger (of course I would write a style for that). The
css would be like "add class .bigger" to the first X words of this paragraph"
and then there would be a "bigger" class that gets used.
Rory
On Nov 24, 2010, at 12:15 PM, John wrote:
> 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;
> }
>
> John
> 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.
>
______________________________________________________________________
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/