[TYPO3] question: tt_content rendering first <p> of a element with different css class?
Sander van Gelderen
mail at NOSPsandervangelderen.nl
Fri Feb 2 11:37:56 CET 2007
Bernhard Welzel schreef:
> hi,
>
> i´m looking for a way to give the first <p> tag of a tt_content element
> (e.g.: text, text/w image) a different css class.
> i tried optionsplit, but it seems not to work for content transformation.
>
> any idea besides writting a ext to parse pages after generation, as it
> seems to trouble performance as this project has a big number of
> non-cachable pages.
>
> any ideas?
>
> - Bernhard
Hi Bernhard,
Maybe you can solve this with CSS.
I am not sure how well the :first-child Pseudo-class is supported among
browsers, but take a look here:
http://www.w3schools.com/css/css_pseudo_classes.asp
example css:
div > p:first-child
{
text-indent:25px
}
More information about the TYPO3-english
mailing list