Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7745053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:55:02+00:00 2026-06-01T09:55:02+00:00

I have a very long table in my webpage. When I print it, it

  • 0

I have a very long table in my webpage. When I print it, it looks that the last row of the table is in the one page ( only in the top of the page ). The rest of the page is blank. On the next page I have nest table. I do not know, why next table is not in the bottom of the last row of first page.

In HTML looks in following way:

<table align="left" cellspacing="0" cellpadding="0" border="1">
  <thead>
    <tr>....</tr>
  </thead>
  <tbody>
    <tr>...</tr>
  </tbody>
</table>

<table align="center" width="800" cellspacing="0" cellpadding="0" border="1" style="margin: 0 auto 0 auto; page-break-inside: avoid;">
  <tbody>
    <tr>
      <td align="left" width="200">xxx</td>
      <td align="right" width="200">xxx</td>
      <td align="right" width="200">xxx</td>
      <td align="right" width="200">x</td>
    </tr>
    <tr>
      <td align="left" width="200">
      <td align="right" width="200">
      <td align="right" width="200">
      <td align="right" width="200">
    </tr>
    <tr></tr>
</table>

CSS:

background-color: white;
border: 1px solid #000000;
border-collapse: collapse;
border-spacing: 0;
font-size: 10px;
vertical-align: middle;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:55:04+00:00Added an answer on June 1, 2026 at 9:55 am

    Try this code and do a print preview. I get the second table right under the first table.

    <!DOCTYPE HTML>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <title>Print of HTML Page</title>
            <style type="text/css">
                table{
                    width: 800px;
                    background-color: white;
                    border: 1px solid #000000;
                    border-collapse: collapse;
                    border-spacing: 0;
                    font-size: 10px;
                    vertical-align: middle;
                }
            </style>
        </head>
        <body>
            <table border="1">
              <thead>
                <tr>
                    <th>Table 1 Header</th>
                </tr>
              </thead>
              <tfoot>
                <tr>
                    <td>Table 1 Footer</td>
                </tr>
              </tfoot>
              <tbody>
                <tr>
                    <td>Table 1 Row 1</td>
                </tr>
                <tr>
                    <td>Table 1 Row 2</td>
                </tr>
                <tr>
                    <td>Table 1 Row 3</td>
                </tr>
                <tr>
                    <td>Table 1 Row 4</td>
                </tr>
                <tr>
                    <td>Table 1 Row 5</td>
                </tr>
                <tr>
                    <td>Table 1 Row 6</td>
                </tr>
                <tr>
                    <td>Table 1 Row 7</td>
                </tr>
                <tr>
                    <td>Table 1 Row 8</td>
                </tr>
                <tr>
                    <td>Table 1 Row 9</td>
                </tr>
                <tr>
                    <td>Table 1 Row 10</td>
                </tr>
                <tr>
                    <td>Table 1 Row 11</td>
                </tr>
                <tr>
                    <td>Table 1 Row 12</td>
                </tr>
                <tr>
                    <td>Table 1 Row 13</td>
                </tr>
                <tr>
                    <td>Table 1 Row 14</td>
                </tr>
                <tr>
                    <td>Table 1 Row 15</td>
                </tr>
                <tr>
                    <td>Table 1 Row 16</td>
                </tr>
                <tr>
                    <td>Table 1 Row 17</td>
                </tr>
                <tr>
                    <td>Table 1 Row 18</td>
                </tr>
                <tr>
                    <td>Table 1 Row 19</td>
                </tr>
                <tr>
                    <td>Table 1 Row 20</td>
                </tr>
                <tr>
                    <td>Table 1 Row 21</td>
                </tr>
                <tr>
                    <td>Table 1 Row 22</td>
                </tr>
                <tr>
                    <td>Table 1 Row 23</td>
                </tr>
                <tr>
                    <td>Table 1 Row 24</td>
                </tr>
                <tr>
                    <td>Table 1 Row 25</td>
                </tr>
                <tr>
                    <td>Table 1 Row 26</td>
                </tr>
                <tr>
                    <td>Table 1 Row 27</td>
                </tr>
                <tr>
                    <td>Table 1 Row 28</td>
                </tr>
                <tr>
                    <td>Table 1 Row 29</td>
                </tr>
                <tr>
                    <td>Table 1 Row 30</td>
                </tr>
                <tr>
                    <td>Table 1 Row 31</td>
                </tr>
                <tr>
                    <td>Table 1 Row 32</td>
                </tr>
                <tr>
                    <td>Table 1 Row 33</td>
                </tr>
                <tr>
                    <td>Table 1 Row 34</td>
                </tr>
                <tr>
                    <td>Table 1 Row 35</td>
                </tr>
                <tr>
                    <td>Table 1 Row 36</td>
                </tr>
                <tr>
                    <td>Table 1 Row 37</td>
                </tr>
                <tr>
                    <td>Table 1 Row 38</td>
                </tr>
                <tr>
                    <td>Table 1 Row 39</td>
                </tr>
                <tr>
                    <td>Table 1 Row 40</td>
                </tr>
                <tr>
                    <td>Table 1 Row 41</td>
                </tr>
                <tr>
                    <td>Table 1 Row 42</td>
                </tr>
                <tr>
                    <td>Table 1 Row 43</td>
                </tr>
                <tr>
                    <td>Table 1 Row 44</td>
                </tr>
                <tr>
                    <td>Table 1 Row 45</td>
                </tr>
                <tr>
                    <td>Table 1 Row 46</td>
                </tr>
                <tr>
                    <td>Table 1 Row 47</td>
                </tr>
                <tr>
                    <td>Table 1 Row 48</td>
                </tr>
                <tr>
                    <td>Table 1 Row 49</td>
                </tr>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
              </tbody>
            </table>
    
            <table border="1" style="page-break-inside: avoid;">
              <tbody>
                <tr>
                  <td>Table 2 Row 1 Cell 1</td>
                  <td>Table 2 Row 1 Cell 2</td>
                  <td>Table 2 Row 1 Cell 3</td>
                  <td>Table 2 Row 1 Cell 4</td>
                </tr>
                <tr>
                  <td>Table 2 Row 2 Cell 1</td>
                  <td>Table 2 Row 2 Cell 2</td>
                  <td>Table 2 Row 2 Cell 3</td>
                  <td>Table 2 Row 2 Cell 4</td>
                </tr>
    
            </table>
    
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html table and one column (or <td> ) contains very long
I have a very long table (more than 1000 rows) that takes a long
I have very long integer sequences that look like this (arbitrary length!): 0000000001110002220033333 Now
I have a very long javascript (so long that it's too long to escape
We have a very long form that has a number of fields and 2
As background I have a very long ID that too long to display in
I have a table with data that I don't need to keep for very
I have a log table that contains job status. One of the columns is
i have a table that have one column (AbsoluteUrl NVARCHAR(2048)) and i want to
I have some very long draggable elements that I can drop in all cells

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.