Avoid div breaking due to overflow in pdf next page

Hi, i modified invoice pdf template adding custom text in footer tags.
Is there a way to tie entire content of footer to avoid page cut in case of overflow to the next page?
In pdf generation i have this problem:

Hi, i solved problem by adding page-break-inside:avoid; to footer like this:

footer style=“page-break-inside:avoid;”

/footer