Ok here is the problem, I got a 2 column page and I need the background color of a fo:block-container to flow like this:

1. Left column: left side page to center page
2. Right column: center page to right side page
3. Top: where block-container starts
3. Bottom: bottom of the page (not where the fo:block-container ends) if I use height="100%" of the block-container it doesn't break with the column.

Sounds easy right?

This is a simple version of what I'm trying to accomplish, if this works it will also work where I need it.

<xsl:template match="p">
  <fo:block-container background-color="green"
                      break-after="column"> 
    <fo:block>
      <xsl:apply-templates />
    </fo:block>
  </fo:block-container>
</xsl:template>

I'm using MSXSL 4.0 and XEP 4.10. Any help is highly appreciated.

try adding

keep-together.within-page="always" to the block specifications, that should work for the break before end of page.

Thanks for the reply, but that still doesn't solve the problem. I could fix that the background-color fills till bottom, but there still is a gap between the block-container and the footnote.

This will extend the background-color till bottom:

<xsl:template match="p">  
<fo:block-container background-color="green">     
  <fo:block>      
    <xsl:apply-templates />    
  </fo:block>  
  <fo:block-container keep-with-previous.within-column="always"
                      keep-together.within-column="always"
                      block-progression-dimension="auto"
                      inline-progression-dimension="100%">
    <fo:block-container keep-with-previous.within-column="always"
                        block-progression-dimension="100%"
                        inline-progression-dimension="100%"
                        background-color="green"
                        overflow="hidden"
                        border-after-width="0">
      <fo:block>.</fo:block>
    </fo:block-container>
  </fo:block-container>
</fo:block-container>
</xsl:template>

But still the biggest problem is to flow the color over the margins left and right.

Edited 6 Years Ago by Ossehaas: n/a

Keep them within the same 2 columns and use a column gap to overflow correctly.

you can place the bottom in a footer.

Also, i dont see any marges or static content for odd and even pages. be sure that is correct to.

With kind greetings,

Henk.

Thanks for the reply Henk. I tried changing the column gap but the inner and outer region is to big to flow the color to the side of the page, it is possible but then the background color of the right column overwrites the text in the left column. Anyway I found a way for the color to flow till the footer. I don't know if it's a good way but it get's the job done.

<xsl:template match="p">
    <fo:block-container background-color="{$color}"
                        margin-bottom="{$page.height} * -1"
                        padding-bottom="{$page.height}">
      <fo:block>
        <xsl:apply-templates/>
      </fo:block>
    </fo:block-container>
  </xsl:template>

After that set the backgroundcolor of the footer. This way you don't even have to fill the back groundcolor of the foot notes.

Thanks and greetings,
Coen

Keep them within the same 2 columns and use a column gap to overflow correctly.

you can place the bottom in a footer.

Also, i dont see any marges or static content for odd and even pages. be sure that is correct to.

With kind greetings,

Henk.

This article has been dead for over six months. Start a new discussion instead.