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 "Michael J. Mueller" <mi...@gmail.com> on 2007/03/21 14:34:07 UTC

Table cell with fake "margins"?

Hello

I am trying to draw borders around table cells and put some space
between the borders.

Due to the lacking of the margin property in table cells, I'm using a
white border for the margin effect. I'm then setting the borders on
the fo:block elements to achive the
border effect.

The result is ugly because the borders around the fo:block elements
depend on the
content of these elements.

Does someone know how to get rid of this dependency or how to achieve
the effect
that I am looking for.

Regards,

Mike

        <fo:table table-layout="fixed" width="100%">
            <fo:table-column column-width="2.6cm"/>
            <fo:table-column column-width="8.5cm"/>
            <fo:table-column column-width="2.3cm"/>
            <fo:table-column column-width="3.3cm"/>
            <fo:table-column  />
            <fo:table-body>
            	<fo:table-row>
            		<fo:table-cell padding="2pt">
            			<fo:block height="7mm" border-style="solid"
border-width="1pt" border-right-width="0pt"
border-color="#000">Référence</fo:block>
            		</fo:table-cell>
            		<fo:table-cell padding="2pt" border-style="solid"
border-right-width="2pt" border-color="#FFF">
            			<fo:block height="7mm" border-style="solid"
border-width="1pt" border-left-width="0pt"
border-color="#000">Désignation</fo:block>
            		</fo:table-cell>
            		<fo:table-cell padding="2pt" text-align="center"
border-style="solid" border-right-width="2pt" border-color="#FFF">
            			<fo:block height="7mm" border-style="solid"
border-width="1pt" border-color="#000">Quantité</fo:block>
            		</fo:table-cell>
            		<fo:table-cell padding="2pt" text-align="center"
border-style="solid" border-right-width="2pt" border-color="#FFF">
            			<fo:block height="7mm" border-style="solid"
border-width="1pt" border-color="#000">Prix Unité (€)</fo:block>
            		</fo:table-cell>
            		<fo:table-cell padding="2pt" text-align="center">
            			<fo:block height="7mm" border-style="solid"
border-width="1pt" border-color="#000">Total (€)</fo:block>
            		</fo:table-cell>
            	</fo:table-row>
			</fo:table-body>
		</fo:table>

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


Re: Table cell with fake "margins"?

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi,

Michael J. Mueller a écrit :
> Hello
> 
> I am trying to draw borders around table cells and put some space
> between the borders.
> 
> Due to the lacking of the margin property in table cells, I'm using a
> white border for the margin effect. I'm then setting the borders on
> the fo:block elements to achive the
> border effect.
> 
> The result is ugly because the borders around the fo:block elements
> depend on the
> content of these elements.
> 
> Does someone know how to get rid of this dependency or how to achieve
> the effect
> that I am looking for.

It pretty much seems the border-separation property would suit your needs:
<fo:table border-separation="4pt"...


Vincent

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