I have a chunck of XSLT that I am using to display a field. I want it to be formatted in a certain font size no matter what the user input as a font size through the style menu. Can this be done through the XSLT?
I think the above is a bit of a bad approach since the naming is non-semantic and you're using inline styles.
I think I would create at div with a more meaninfull name like "disclaimer" and then set the font-size in an external stylesheet. If neccesary use !important to ensure that the choosable styles from the RTE will not override the font-size.
XSLT automatic Formatting
Hi There,
I have a chunck of XSLT that I am using to display a field. I want it to be formatted in a certain font size no matter what the user input as a font size through the style menu. Can this be done through the XSLT?
My code looks like this:
Hi Vincent
I think the above is a bit of a bad approach since the naming is non-semantic and you're using inline styles.
I think I would create at div with a more meaninfull name like "disclaimer" and then set the font-size in an external stylesheet. If neccesary use !important to ensure that the choosable styles from the RTE will not override the font-size.
Hope these pointers helps :-)
/Jan
Hi Vincent,
I'm with Jan on this, but I've also seen what clients are capable of :-)
Too ensure that you can override the styles, use an id on the wrapping div, and use !important to overrule, e.g.:
/* CSS */ #disclaimer { font-size: WHATEVER; } #disclaimer * { font-size: 1em !important; color: inherit !important; }
<!-- XSLT --> <xsl:if test="$product/data[@alias = 'textdisclaimers']"> <div id="disclaimer"> <xsl:value-of select="$product/data[@alias = 'textdisclaimers']" disable-output-escaping="yes" /> </div> </xsl:if>/Chriztian
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.