How to transfer the HTML (including text content) beyond the div part to the next div display? It's a headache. (thank you very much for asking for help)

A div contains a table,table with fixed content and content passed by the server, which is displayed through traversal. If traversing too much content exceeds the height of the div, this is how to get the excess html content to the table display in the next div, div fixed height 1570px


        <table>
            <tbody>
            <tr>
                <td>
                    

:

:

:7777

:

:

</td> </tr> </tbody> </table> </div> </div>
Mar.23,2021

this can only be done by calculating the height and then moving the dom down


first calculate how many lines N can be displayed by 1570px, the cumulative height when traversing, and the number of lines of current content (contentnum) > = N

//divtable,divtable
<div>
    <table>
    foreach($data as $v)
    {
        if(contentnum >= N)
        {
            echo "divtable+divtable";
            contentnum  = 0;//0
        }
        echo "Your Contents!";
    }
    
    </table>
</div>
Menu