Forum Bugs

Table in div placed in footer

gribouille
Hi, there is two bugs reported in this post :
1- Table cell content not well placed
2- Cell content not full

Styles used are :

.FooterMainBlock
{
    position: absolute;
    font-family:Arial;
    font-size: 7pt;
    line-height: 8.5pt;
    margin-top: 264mm;
    margin-left: 39mm;
    width: auto;
    vertical-align:text-bottom;
}
.FooterBlock1
{
    position: absolute;
    background-color: #d4effc;
    margin-left: 0mm;
    width: 37mm;
    height: 23mm;
    vertical-align:text-bottom;
}
.FooterBlock2
{
    position: absolute;
    background-color: #d4effc;
    margin-left: 42mm;
    width: 37mm;
    height: 23mm;
    vertical-align:text-bottom;
}
.FooterCell
{
    width: 37mm;
    height: 23mm;
    text-align: left;
    vertical-align: bottom;
    border: thin solid #000000;
}



So I've made a footer in which there is this code :

<div id="footer" class="FooterMainBlock">
        <div class="FooterBlock1">
            <table>
                <tr>
                    <td class="FooterCell">
                        <span>line 1<br/>line 2<br/>line 3</span>
                    </td>
                </tr>
            </table>
        </div>
        <div class="FooterBlock2">
            <table>
                <tr>
                    <td class="FooterCell">
                        <span>line 1<br/>line 2<br/>line 3</span>
                    </td>
                </tr>
            </table>
        </div>
</div>



When FooterBlockX are displayed, the text in table cell appear under the cell (just first lines are displayed) and under the div FooterBlock1 in the generated PDF, but under Firefox, Opera and IE, it's well displayed.

After I've changed the position style from FooterBlock1 to "relative", everything goes well in the PDF (for FooterBlock1 only), but when I display the HTML page in a browser, the FooterBlock1 isn't on the same line with the FooterBlock2.
xuehong
Hi,

I couldn't reproduce the problem based on the code you posted: three lines are all well displayed in the PDF output; cells are not full but that is because the cells have a specified height that is bigger than their content height.
I guess the code with which you produced the problem must be different from the code you posted here. The problem might be related to the bug reported by another user:

Table cell height issue

This will be fixed for the next coming release.

Xuehong
gribouille
Hi,

I could reproduce it easily. In the given code there is only 2 blocks whereas in my testing code there is 4 and the text for lines is different. Maybe you want the page style :


@page {
  size: A4;
  margin-left:0mm;
  margin-top: 0mm;
  margin-bottom: 42mm;
   
  @top-left {
    content : flow(header);
    margin-left: 0mm;
  }
 
  @bottom-left { 
    content: flow(footer);
    margin-left: 39mm;
  }
 
}
#header { prince-flow: static(header); }
#footer { prince-flow: static(footer); } 



But I've solved my problem by using a table for my blocks ; 4 cells for the blocks and 3 cells which are blocks separators. This solution makes me removing my div tags so it's a little less flexible than it was, but it works. Flexibility has been find by making one master style for blocks cells and another specific for each cell and applying these two styles on each block cell.

After having a look at the Table cell height issue topic I have tried with with min-height and problem doesn't change.

Another question, is it normal that indicating an attribute in HTML code like border, align... for a table and other tag isn't conserved in the PDF output? It's conserved when we pass it by a style property.
I don't know if it would help, I'm running Prince under a Debian Sarge installed with the Debian package.