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 Abel Braaksma <ab...@xs4all.nl> on 2007/02/28 13:45:02 UTC
vertical-align=middle does not put content of table-cell in the middle
Hi List & fop-users,
I have a nicely formatted table but got stuck when trying to adjust the
content of each cell to the middle of it. Perhaps this has been asked
before, but I didn't find it in the archives. Here is the snippet:
<fo:table-cell vertical-align="middle" >...</fo:table-cell>
It becomes apparent when the text of one cell crosses several lines and
the text in other cells do not.
In addition: on the compliance page I found "[0.93] Percentages are not
supported, yet." and on the history of changes
(http://xmlgraphics.apache.org/fop/0.93/changes_0.93.html) I found
"Bugfix: Percentages in vertical-align property values were not
correctly handled." which sounds to me that percentages should work now,
is it not?
Thanks once again for such a nice product. The more I use the more I am
stunned by the sheer volume of the work put forward and the inherent
complexity of formatting objects.
Cheers,
-- Abel Braaksma
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: vertical-align=middle does not put content of table-cell in the middle
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Feb 28, 2007, at 14:55, Abel Braaksma wrote:
Hi Abel,
> Andreas L Delmelle wrote:
>> On Feb 28, 2007, at 13:45, Abel Braaksma wrote:
>>> <fo:table-cell vertical-align="middle" >...</fo:table-cell>
>>
>> The vertical-align shorthand does not apply to a fo:table-cell,
>> and since it is non-inherited, specifying it there does not have
>> any effect (unless a value of "inherit" or "from-nearest-specified
>> ()" is used on the descendants).
>
> Thanks for your quick reply, Andreas.
>
> From http://www.w3.org/TR/2001/REC-xsl-20011015/
> slice7.html#vertical-align it says: "Applies to: inline-level and
> 'table-cell' elements", which I interpreted as that it applies to
> fo:table-cell as well. Do I misinterpret the spec?
No, but...
This part of the property definition seems to have been removed in
XSL 1.1, most likely to remove the inherent contradiction with
http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_table-cell
where vertical-align is not mentioned as an applicable property.
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: vertical-align=middle does not put content of table-cell in the
middle
Posted by Abel Braaksma <ab...@xs4all.nl>.
Andreas L Delmelle wrote:
> On Feb 28, 2007, at 13:45, Abel Braaksma wrote:
>> <fo:table-cell vertical-align="middle" >...</fo:table-cell>
>
> The vertical-align shorthand does not apply to a fo:table-cell, and
> since it is non-inherited, specifying it there does not have any
> effect (unless a value of "inherit" or "from-nearest-specified()" is
> used on the descendants).
Thanks for your quick reply, Andreas.
>From
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#vertical-align it
says: "Applies to: inline-level and 'table-cell' elements", which I
interpreted as that it applies to fo:table-cell as well. Do I
misinterpret the spec?
> If I judge correctly, the property you're actually looking for is
> display-align :
>
> <fo:table-cell display-align="center">
This worked, though the content needed an extra pt down for adjustment
(but it was hard to tell if this was visually not in the middle, or
physically not in the middle).
Cheers
-- Abel Braaksma
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: vertical-align=middle does not put content of table-cell in the middle
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Feb 28, 2007, at 13:45, Abel Braaksma wrote:
Hi,
> I have a nicely formatted table but got stuck when trying to adjust
> the content of each cell to the middle of it. Perhaps this has been
> asked before, but I didn't find it in the archives. Here is the
> snippet:
>
> <fo:table-cell vertical-align="middle" >...</fo:table-cell>
The vertical-align shorthand does not apply to a fo:table-cell, and
since it is non-inherited, specifying it there does not have any
effect (unless a value of "inherit" or "from-nearest-specified()" is
used on the descendants).
If I judge correctly, the property you're actually looking for is
display-align :
<fo:table-cell display-align="center">
<snip />
> In addition: on the compliance page I found "[0.93] Percentages are
> not supported, yet." and on the history of changes (http://
> xmlgraphics.apache.org/fop/0.93/changes_0.93.html) I found "Bugfix:
> Percentages in vertical-align property values were not correctly
> handled." which sounds to me that percentages should work now, is
> it not?
This indeed sounds like an oversight. We'll have to check whether the
testcases cover this and update the compliance page if necessary.
Thanks for reporting this.
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org