Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2010, 01:53 AM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Setting background color for a text in XSLFO

Hello Im very new to the XSLFO. I have a requirement to color a text entry based on some condition. which i do using the snippet

Code:
<fo:inline color = "red">
    <xsl:value-of select="."/>
</fo:inline>
With the above snippet i am able to set the forecolor of the text to RED. My question is how to set the background color for the same.

I can add background color using

Code:
 <fo:inline color = "red">
   <fo:block background-color = "yellow">
    <xsl:value-of select="."/>
  </fo:block> 
 </fo:inline>
But this is making my entry come on a separate line which isnt my requirement

Though the xslfo documentation says there is a property available for to add the background color for a text.

Code:
<fo:inline background-color = "yellow">
 Hello,World
 </fo:inline>
Im using the xslfo version 1.0

Anyone out there to help me out ?

Regards




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change background color of text beetle_jaipur Javascript How-To 1 December 1st, 2009 02:03 AM
background-color: white; covers text smgolden CSS Cascading Style Sheets 6 August 3rd, 2007 12:21 PM
Setting Background color of the Stage with AS robprell Flash (all versions) 2 December 12th, 2005 02:51 PM
Setting backGround Colour of a text pazzuzu C++ Programming 0 January 21st, 2005 11:15 AM
Changing Text Box Background Color rodmcleay Javascript How-To 9 December 11th, 2003 05:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.