0

How do I make sure that the element is not overlapped?

In the css I used fixed and bottom.

I've tried setting it as a footer with no success.

I just want it on the last page the div.

Is there anything php or html side that can be done? Sorry if the code is not great but I'm a beginner.

enter image description here

PHP:

$mpdf = new \Mpdf\Mpdf(["setAutoTopMargin" => "stretch", "autoMarginPadding" => 17]);
$mpdf->SetTitle("Fattura_" . $arr[2] . "-" . $arr[1] . "-" . $arr[0] . "_Numero_" . $numero . ".pdf");
$mpdf->SetHTMLHeader($head);
$mpdf->setFooter("Pagina {PAGENO}/{nbpg}");
$mpdf->WriteHTML(file_get_contents("./pdf/fattura.css"), \Mpdf\HTMLParserMode::HEADER_CSS);
$mpdf->WriteHTML($file);
$mpdf->Output("Fattura_" . $arr[2] . "-" . $arr[1] . "-" . $arr[0] . "_Numero_" . $numero . ".pdf", "I");

HTML BODY:

<!doctype html>
<html>
    <body>
        <table class="table tratte">
            <thead>
                <tr class="back">
                    <th class="desc">DESCRIZIONE</th><th class="tm">TM</th><th class="euro-tm">€/TM</th><th class="imp">IMPORTO</th>
                </tr>
            </thead>
            <tbody>
                {content}
            </tbody>
        </table>
        <div class="back round">
            <table class="table footer">
                <tr>
                    <td class="pic" rowspan="4">
                    PAGAMENTO {giorni} GG DATA FATTURA<br>
                    BANCA D'APPOGGIO BCC DELLE PREALPI AG. SANT'URBANO<br>
                    IBAN: IT 03 R089 0462 8700 3801 5005198<br>
                    COPIA AD USO AMMINISTRATIVO
                    </td>
                    <td class="medio">IMPONIBILE</td><td class="right medio padd"><b>€ {imponibile}</b></td>
                </tr>
                <tr>
                    <td class="medio">ALIQUOTA IVA</td><td class="right medio padd"><b>22%</b></td>
                </tr>
                <tr>
                    <td class="medio">IMPORTO IVA</td><td class="right medio padd"><b>€ {imp_iva}</b></td>
                </tr>
                <tr>
                    <td class="medio">TOTALE FATTURA</td><td class="right medio padd"><b>€ {totale}</b></td>
                </tr>
            </table>
        </div>
    </body>
</html>

CSS:

.round {
    padding: 10px;
    border-radius: 10px;
    position: fixed;
    bottom: 0;
}
panfilo03
  • 21
  • 3

0 Answers0