开发者

Page-break-after vertical alignment of a table

开发者 https://www.devze.com 2023-02-08 22:06 出处:网络
I have been using the page-break-after command to break an html report after each \"grouping\". My problem is it is now leaving my table floating in the middle of the page. Each page is different wher

I have been using the page-break-after command to break an html report after each "grouping". My problem is it is now leaving my table floating in the middle of the page. Each page is different where it puts the table, sometimes at the top of the page, sometimes in the middle and sometimes at the bottom. There is quite a bit of complexity in the HTML so I decided to take an image instead:

Page-break-after vertical alignment of a table

I will try to sum up the html

<body>
<table>
<thead>
{this is top bold box on each page}
</thead>
<tr>
<td>
<table> {this is the results table}
<thead>
{this is the headers of the "f开发者_运维知识库loating" results table}
</thead>
{tr's of data here}
</table>
</td>
</tr>
</table>
</body>

we are using display:table-header-group to get the table headers to show up on each page. Can you help me figure out what I need to do to get those tables to be at the top of the page? (this is in IE8)


Impossible to tell from the information provided. Obviously, a CSS issue but can't tell where to begin. Common problems are the display CSS not completely accounted for in the print CSS and, using display:none; on an child element inside of a div tag that has height defined (removes the content but the space is still there.) The latter is what I suspect. I've found adding background colors to various elements very helpful in debugging CSS problems such as yours.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号