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 Rakesh Patel <rp...@sbiandcompany.com> on 2003/01/24 13:03:28 UTC
Table cell alignment and images
Hi,
I have a problem I have not been able to solve for quite a while to do with placement of images inside table cells.
I have two images, held within two table cells.
The code looks like this:
<fo:table-column column-width="31.8mm"/>
<fo:table-column column-width="46mm"/><!-- 46mm -->
<fo:table-body>
<fo:table-row>
<fo:table-cell background-color="blue">
<fo:block text-align="outside">
<fo:external-graphic>
<xsl:attribute name="src"><xsl:value-of select="boat.jpg"/></xsl:attribute>
</fo:external-graphic>
</fo:block>
</fo:table-cell>
<fo:table-cell background-color="black">
<fo:block text-align="start">
<fo:external-graphic>
<xsl:attribute name="src"><xsl:value-of select="sky.gif"/></xsl:attribute>
</fo:external-graphic>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
The first image in the cell is flush against the right side of the cell. The second image should be flush against the left side of its cell (giving the impression of one continous graphic - because both images have a border built in to them). However, there is a 0.5px gap between the image and the left edge. I have tried all combinations of text-align and still no luck. Can anyone help?
Once this is sorted, I need to insert an additional cell between these two cells which contains some text but also has the border on the top and bottom, giving the impression of a boxed border overall with an image, some text and another image.
Originally, I had no border within the images themselves but there was still a gap between the image and the surrounding cell I couldn't remove, I was advised to make the border part of the image. This worked for the left hand image but not the right!
Thanks
Rakesh
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Table cell alignment and images
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Rakesh Patel wrote:
> The first image in the cell is flush against the right side of the cell. The
> second image should be flush against the left side of its cell (giving the
> impression of one continous graphic - because both images have a border built
> in to them). However, there is a 0.5px gap between the image and the left
> edge.
Image placement is subject to round off, and there may be
still off-by-one errors. You can try to compensate by using
a negative start-indent.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org