< TBODY>,IE和分页符 [英] <TBODY>, IE, and page-break

查看:61
本文介绍了< TBODY>,IE和分页符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我一直试图找出一些东西,主要是通过试验&错误。

或许其他人可能知道。


i有一个html表,其中包含相关数据块 - 每个

块包含三行。这张桌子用于纸张打印。我想b $ b想告诉浏览器*不要*破坏我的积木。相反,如果

最后一个无法完全渲染到剩余的页面区域,我希望它能够巧妙地在< tbody>之间插入分页符。


i试图通过设置< tbodyw /

" page-break-before:auto;"来实现这一目标。 - 希望它会在任何< tbody不能适合页面之前自动插入

。遗憾的是,这个

无效。我不确定IE用于auto的是什么标准,但它不是b $ b似乎不是这个元素是否适合这个页面?


我也试过page-break-after :auto",两者兼而有之。没有骰子。


有没有人有任何其他想法?


谢谢!和继承人html:

< table>

< thead>

< tr>

< ; th>标题1< / th>

< th>标题2< / th>

< / tr>

< thead>

< tfoot>

< tr>

< td>页脚1< / td>

< td>页脚2< / td>

< / tr>

< tfoot>


< ; - 不要破坏这个区块 - >

< tbody>

< tr>

< td>块1 ,第1行< / td>

< td>第1行,第2行< / td>

< / tr>

< ; tbody>


<! - 不要破坏这个块 - >

< tbody>

< tr>

< td>块2,第1行< / td>

< td>块2,第2行< / td>

< / tr>

< tbody>


<! - 不要破坏这个块 - >

< tbody>

< tr>

< td>块3,第1行< / td>

< td>块3,第2行< / td>

< / tr>

< tbody>


< / table>

解决方案

ma**@mailinator.com 写道:


hello,


我一直试图找出一些东西,主要是通过试验&错误。

或许其他人可能知道。


i有一个html表,其中包含相关数据块 - 每个

块包含三行。这张桌子用于纸张打印。我想b $ b想告诉浏览器*不要*破坏我的积木。相反,如果

最后一个无法完全渲染到剩余的页面区域,我希望它能够巧妙地在< tbody>之间插入分页符。


i试图通过设置< tbodyw /

" page-break-before:auto;"来实现这一目标。 - 希望它会在任何< tbody不能适合页面之前自动插入

。遗憾的是,这个

无效。我不确定IE用于auto的是什么标准,但它不是b $ b似乎不是这个元素是否适合这个页面?


我也试过page-break-after :auto",两者兼而有之。没有骰子。


有没有人有任何其他想法?


谢谢!和继承人html:


< table>

< thead>

< tr>

< th>标题1< / th>

< th>标题2< / th>

< / tr>

< thead>

< tfoot>

< tr>

< td>页脚1< / td>

< td>页脚2< / td>

< / tr>

< tfoot>


<! - 不要破坏这个区块 - >

< tbody>

< tr>

< td>块1,行1< / td>

< td>块1,行2< / td>

< / tr>

< tbody>


<! - 不要打破这个区块 - >

< tbody>

< tr>

< td>第2行,第1行< / td>

< t d>块2,第2行< / td>

< / tr>

< tbody>


< ! - 不要破坏这个块 - >

< tbody>

< tr>

< td>块3,第1行< / td>

< td>第3行,第2行< / td>

< / tr>

< tbody>


< / table>



很难说,如果你使用那个标记是如此无效.. 。从哪里开始。

显示网址也许你的例子有拼写错误(希望如此)


-

小心,


Jonathan

-------------------

小作品STUDIO
http://www.LittleWorksStudio.com


在alt.html中, ma**@mailinator.com 写道:


我有一个由相关数据块组成的html表 - 每个

块包含三行。 ...



如果将三行合并为* one *< tbody会发生什么?


<! - 不要破坏这个区块 - >

< tbody>

< tr>

< td>块1,行1< / td< - 这些将是* cell * 1

< td>块1,行2< / td< - * cell * 2 ...

< / tr>

< tr>

< td>第2行,第1行< / td>

< td>第2行,第2行< / td>

< / tr>

< tr>

< td>块3,第1行< / td>

< td>块3,第2行< / td>

< / tr>

< tbody>



一个想法,但未经测试。没有任何方便的桌子来制作这个。


-

-bts

-Motorcycles无视重力;汽车只是糟透了。




Jonathan N. Little写道:


Hard要说,如果你使用那个标记是如此无效......从哪里开始。

显示一个URL也许你的例子在这里有错别字(希望)



也许,我只是手动输入谷歌的用户界面(我的真实表格

有太多不相关的细节)。这不是重要的部分。什么是重要的,是用于解决问题的技术。


样本表,我认为它非常基本:a< thead>, a

< tfoot>,以及一个或多个< tbody> s。

matt


blockquote>

hello,

ive been trying to figure something out, largely thru trial & error.
thought perhaps someone else may have knowledge.

i have an html table that consists of blocks of related data -- each
block contains three rows. this table is destined for paper printing. i
would like to tell the browser *not* to bust up my blocks. rather, i
would like it to smartly insert a page break inbetween <tbody>s if the
last one cannot be rendered entirely onto the remaining page area.

i have tried to accomplish this by styling the <tbodyw/
"page-break-before:auto;" -- hoping that it would automatically insert
a break before any <tbodythat cant fit on the page. sadly, this
doesnt work. im not sure what IE uses for its "auto" criteria, but it
doesnt appear to be "Does this element fit onto this page?"

ive also tried "page-break-after:auto", and both. no dice.

does any one have any other ideas?

thanks! and heres the html:
<table>
<thead>
<tr>
<th>header 1</th>
<th>header 2</th>
</tr>
<thead>
<tfoot>
<tr>
<td>footer 1</td>
<td>footer 2</td>
</tr>
<tfoot>

<!-- dont break this block -->
<tbody>
<tr>
<td>block 1, row 1</td>
<td>block 1, row 2</td>
</tr>
<tbody>

<!-- dont break this block -->
<tbody>
<tr>
<td>block 2, row 1</td>
<td>block 2, row 2</td>
</tr>
<tbody>

<!-- dont break this block -->
<tbody>
<tr>
<td>block 3, row 1</td>
<td>block 3, row 2</td>
</tr>
<tbody>

</table>

解决方案

ma**@mailinator.com wrote:

hello,

ive been trying to figure something out, largely thru trial & error.
thought perhaps someone else may have knowledge.

i have an html table that consists of blocks of related data -- each
block contains three rows. this table is destined for paper printing. i
would like to tell the browser *not* to bust up my blocks. rather, i
would like it to smartly insert a page break inbetween <tbody>s if the
last one cannot be rendered entirely onto the remaining page area.

i have tried to accomplish this by styling the <tbodyw/
"page-break-before:auto;" -- hoping that it would automatically insert
a break before any <tbodythat cant fit on the page. sadly, this
doesnt work. im not sure what IE uses for its "auto" criteria, but it
doesnt appear to be "Does this element fit onto this page?"

ive also tried "page-break-after:auto", and both. no dice.

does any one have any other ideas?

thanks! and heres the html:
<table>
<thead>
<tr>
<th>header 1</th>
<th>header 2</th>
</tr>
<thead>
<tfoot>
<tr>
<td>footer 1</td>
<td>footer 2</td>
</tr>
<tfoot>

<!-- dont break this block -->
<tbody>
<tr>
<td>block 1, row 1</td>
<td>block 1, row 2</td>
</tr>
<tbody>

<!-- dont break this block -->
<tbody>
<tr>
<td>block 2, row 1</td>
<td>block 2, row 2</td>
</tr>
<tbody>

<!-- dont break this block -->
<tbody>
<tr>
<td>block 3, row 1</td>
<td>block 3, row 2</td>
</tr>
<tbody>

</table>

Hard to say, if you used that markup is is so invalid...where to start.
Show a URL maybe your example here has typos (hopefully)

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


In alt.html, ma**@mailinator.com wrote:

i have an html table that consists of blocks of related data -- each
block contains three rows. ...

What happens if you combine the three rows into *one* <tbody?

<!-- dont break this block -->
<tbody>
<tr>
<td>block 1, row 1</td <-- these would be *cell* 1
<td>block 1, row 2</td <-- *cell* 2 ...
</tr>
<tr>
<td>block 2, row 1</td>
<td>block 2, row 2</td>
</tr>
<tr>
<td>block 3, row 1</td>
<td>block 3, row 2</td>
</tr>
<tbody>

A thought, but untested. Don''t have any handy tables to produce this.

--
-bts
-Motorcycles defy gravity; cars just suck.



Jonathan N. Little wrote:

Hard to say, if you used that markup is is so invalid...where to start.
Show a URL maybe your example here has typos (hopefully)

perhaps, i just typed that in manually into google''s UI (my real table
has too many un-related details). that isnt the important part. whats
important, is the technique used to solve the problem.

as for the sample table, i thought it pretty basic: a <thead>, a
<tfoot>, and one or more <tbody>s.
matt


这篇关于&lt; TBODY&gt;,IE和分页符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆