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>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37d1e-2b840.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37d1e-2b840.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?