You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Amita Rathore <ar...@in.ibm.com> on 2004/06/11 14:03:01 UTC

Table header colors.

Thanks Chris for your help with the reusable group of properties.

Now I am trying to create a table , the header of the table contains 4 
columns. The text for first column is as small as a single word , while 
for second it wraps across two lines. 

The problem is that I am trying to put a background color for the header 
cells with a padding of 2pts.

The colors across the columns which wrap and which do not wrap is not 
uniform. The figure explains it better.



Please suggest.

Thanks,
--------------------------------------------------------------
Amita Rathore

Re: Table header colors.

Posted by Amita Rathore <ar...@in.ibm.com>.
Can't understand how it can be done, 

can you please provide a snippet.





Chris Bowditch <bo...@hotmail.com>
06/14/2004 05:08 PM
Please respond to fop-user
 
        To:     fop-user@xml.apache.org
        cc: 
        Subject:        Re: Table header colors.


Amita Rathore wrote:

> 
> I had already tried this, but doing so the padding goes off.

Oh, I see. You might be able to use margin instead, if you dont have 
borders 
on the cells, then the spacing effect between text should appear the same.

Chris




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org



Re: Table header colors.

Posted by Chris Bowditch <bo...@hotmail.com>.
Amita Rathore wrote:

> 
> I had already tried this, but doing so the padding goes off.

Oh, I see. You might be able to use margin instead, if you dont have borders 
on the cells, then the spacing effect between text should appear the same.

Chris




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Table header colors.

Posted by Amita Rathore <ar...@in.ibm.com>.
I had already tried this, but doing so the padding goes off.





Chris Bowditch <bo...@hotmail.com>
06/14/2004 04:45 PM
Please respond to fop-user
 
        To:     fop-user@xml.apache.org
        cc: 
        Subject:        Re: Table header colors.

 

Amita Rathore wrote:

> 
> Here goes the snippet:
> 
> <fo:table table-layout="fixed"  >
>         <fo:table-column  column-width="15mm"/>
>         <fo:table-column  column-width="15mm"/>
>         <fo:table-column  column-width="28mm"/>
>         <fo:table-body>
>                 <fo:table-row  >
>                         <fo:table-cell padding="2pt" 
> text-align="left" >
>                         <fo:block font-size="10pt" 
>  background-color="#9999ff">Date</fo:block> 

This is your problem. You need to specify background-color on the cell 
instead 
of the block. That way the whole cell will have the background color, and 
not 
just the block, whose length may not fill up the row height, as youve 
discovered. E.g.

<fo:table-cell padding="2pt" text-align="left" 
background-color="#9999ff"><fo:block 
font-size="10pt">Date</fo:block></fo:table-cell>

<snip/>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org



Re: Table header colors.

Posted by Chris Bowditch <bo...@hotmail.com>.
Amita Rathore wrote:

> 
> Here goes the snippet:
> 
> <fo:table table-layout="fixed"  >
>         <fo:table-column  column-width="15mm"/>
>         <fo:table-column  column-width="15mm"/>
>         <fo:table-column  column-width="28mm"/>
>         <fo:table-body>
>                 <fo:table-row  >
>                         <fo:table-cell padding="2pt"     
> text-align="left" >
>                         <fo:block font-size="10pt" 
>  background-color="#9999ff">Date</fo:block>        

This is your problem. You need to specify background-color on the cell instead 
of the block. That way the whole cell will have the background color, and not 
just the block, whose length may not fill up the row height, as youve 
discovered. E.g.

<fo:table-cell padding="2pt" text-align="left" 
background-color="#9999ff"><fo:block 
font-size="10pt">Date</fo:block></fo:table-cell>

<snip/>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Table header colors.

Posted by Amita Rathore <ar...@in.ibm.com>.
Here goes the snippet:

<fo:table table-layout="fixed"  >
        <fo:table-column  column-width="15mm"/>
        <fo:table-column  column-width="15mm"/>
        <fo:table-column  column-width="28mm"/>
        <fo:table-body>
                <fo:table-row  >
                        <fo:table-cell padding="2pt"     text-align="left" 
>
                        <fo:block font-size="10pt" 
background-color="#9999ff">Date</fo:block> 
                        </fo:table-cell>
                        <fo:table-cell padding="2pt" text-align="center" >
                                <fo:block font-size="10pt" 
background-color="#9999ff">Employee Name</fo:block>
                        </fo:table-cell>
                        <fo:table-cell padding="2pt" text-align="left" >
                                <fo:block font-size="10pt" 
background-color="#9999ff">Home Address/Official Address</fo:block>
                        </fo:table-cell>
                </fo:table-row>
        </fo:table-body>
</fo:table>

The address spans over multiple lines.





Chris Bowditch <bo...@hotmail.com>
06/14/2004 04:10 PM
Please respond to fop-user
 
        To:     fop-user@xml.apache.org
        cc: 
        Subject:        Re: Table header colors.

 

Amita Rathore wrote:

> Now I am trying to create a table , the header of the table contains 4 
> columns. The text for first column is as small as a single word , while 
> for second it wraps across two lines.
> 
> The problem is that I am trying to put a background color for the header 

> cells with a padding of 2pts.

Are you defining the background color on the cell on the block within the 
cell? Please provide a snippet of your XSL-FO.

<snip/>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org



Re: Table header colors.

Posted by Chris Bowditch <bo...@hotmail.com>.
Amita Rathore wrote:

> Now I am trying to create a table , the header of the table contains 4 
> columns. The text for first column is as small as a single word , while 
> for second it wraps across two lines.
> 
> The problem is that I am trying to put a background color for the header 
> cells with a padding of 2pts.

Are you defining the background color on the cell on the block within the 
cell? Please provide a snippet of your XSL-FO.

<snip/>

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org