[
https://issues.apache.org/jira/browse/FOP-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143488#comment-15143488
]
Andreas L. Delmelle commented on FOP-2574:
------------------------------------------
*scratches head*
After looking at the sample rendered in HTML, I must admit that that does looks
a bit unexpected...
Still, all browsers I tried, rendered it exactly the same way. The CSS spec --
and by extension also XSL-FO -- does state that the alignment is not with
respect to the viewport, though, so not sure if that means we are implementing
it wrongly ( ? )
That said, suppose one adds one line above that just contains the string 'AAA',
you would end up with a right-aligned first line and a second line that
_appears_ to be left-aligned ( ? )
Example in HTML:
{code:language=html}
<div style="width: 70px; text-align: right; white-space:nowrap; display:
block; overflow: hidden; border: 1px solid #323232;">AAA<br>Lorem ipsum
oposum!</div>
{code}
If that is the intended rendering, it can be obtained via FOP by means of a
nested fo:block-container. Note that "text-align" is an inherited property, so
can be set at the level of the outer fo:block-container, and then overridden on
an inner fo:block-container.
Example rendering similarly in XSL-FO:
{code:language=xml}
<fo:block-container text-align="right" border-color="black"
border-style="solid" border-width="1pt" overflow="hidden" width="70px"
white-space="nowrap">
<fo:block>AAA</fo:block>
<fo:block-container text-align="left"><fo:block>Lorem ipsum
oposum!</fo:block></fo:block-container>
</fo:block-container>
{code}
> Right alignment doesn't work correctly
> --------------------------------------
>
> Key: FOP-2574
> URL: https://issues.apache.org/jira/browse/FOP-2574
> Project: FOP
> Issue Type: Bug
> Affects Versions: 2.0, 2.1
> Environment: Window 7 x64, Java build 1.8.0_72-b15
> Reporter: Đorđe Zeljić
>
> Simple .fo example at
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)