[TYPO3] tt_news first paragraph
Tyler Kraft
tyler.kraft at netefficiency.co.uk
Sun Aug 24 11:30:00 CEST 2008
But it won't work in IE6
Xavier Perseguers wrote:
> Hi,
>
> Lee M. Childress wrote:
>> Before I go hacking away at the actual tt_news code, I am sure there
>> is a better way to do this:
>>
>> When displaying a single view in tt_news I would like only the first
>> paragraph of the news body to have a different class tag than the
>> rest, i.e.:
>>
>> <p class="bodytext_first">This is the first paragraph of the news
>> story.</p>
>> <p class="bodytext">This is the second and remaining paragraphs.</p>
>>
>> Any decent way to do this without altering the code?
>
> CSS3 (or CSS2 ?) :first-sibling for instance or doing something like that:
>
> <div class="news">
> <p class="bodytext">This is the first...</p>
> <p class="bodytext">This is the second...</p>
> </div>
>
> and in CSS
>
> ..news p {
> # first
> }
>
> ..news p+p {
> # second and next
> }
>
> At least this is the idea...
>
> HTH
>
More information about the TYPO3-english
mailing list