Thread: page-break-inside tbody
Results 1 to 6 of 6
Related
-
html page break Forum: HTML Forum
Replies: 3 -
forced page break Forum: CSS Forum
Replies: 0 -
opening new .html files inside a page Forum: HTML Forum
Replies: 9 -
break time :( Forum: General Discussion
Replies: 4 -
html scroll page inside a table? Forum: HTML Forum
Replies: 2
-
07-28-2003, 02:37 PM #1
page-break-inside tbody
I saw the "page-break-inside" property in a book and tried to apply it to a tbody tag to avoid that groups of 3 rows break between pages.
When I access the page and do a print preview, nothing happens though. The groups of rows are still divided between pages.
Is there any way that I could achieve this?
-
07-28-2003, 05:47 PM #2
Hiya, welcome to the forums.
its kinda hard to judge whats going on without actully seeing your code. Do you have a link?If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
07-29-2003, 03:01 PM #3
Thanks for your reply.
I'm trying to avoid that the contents within the tbody tags split between pages.
Here are the definitions for the tbody classes on the CSS:
.dotted {
background-color: #EFEFEF;
color: #000000;
page-break-inside: avoid;
}
.dotted2 {
background-color: #CCCCCC;
page-break-inside: avoid;
}
And, here's a piece of the code that gets printed on the page (including the heading row. A piece of perl code grabs the info from a database and prints the sets of 3 rows per record):
<table border='1' frames='bottom' cellspacing='0' bordercolor='#000000'>
<tr>
<td valign='top'><p class='highlight' align='center'>CRN</p></td>
<td valign='top'><p class='highlight' align='center'>Subj.</p></td>
<td valign='top'><p class='highlight' align='center'>Num.</p></td>
<td valign='top'><p class='highlight' align='center'>Sect.</p></td>
<td valign='top'><p class='highlight' align='center'>Credit</p></td>
<td colspan=2 valign='top'><p class='highlight' align='center'>Time</p></td>
<td valign='top'><p class='highlight' align='center'>Days</p></td>
<td valign='top'><p class='highlight' align='center'>Title</p></td>
<td valign='top'><p class='highlight' align='center'>Instructor</p></td>
<td valign='top'><p class='highlight' align='center'>Start-<br>End Dates</p></td>
<td valign='top'><p class='highlight' align='center'>Location</p></td>
<td valign='top'><p class='highlight' align='center'>Special<br>Fee</p></td>
</tr>
<tbody class=dotted>
<tr>
<td valign='top'><p><A HREF="JavaScript:windowOpen('http://128.59.202.34/prometheus/tccoursesyl/course.cfm?enter_crn=20030931281')" onMouseOver="window.status=''; return true" onMouseOut="window.status=''; return true">31281</a></p></td>
<td valign='top'><p>A&HL</p></td><td valign='top'><p>4000</p></td>
<td valign='top'><p>001</p></td><td valign='top'><p>3</p></td>
<td colspan=2 valign='top'><p>07:20 pm-09:00 pm</p></td>
<td valign='top'><p>R</p></td>
<td valign='top'><p>Introduction to Linguistics</p></td>
<td valign='top'><p>J Purdy</p></td>
<td valign='top'><p>09/03-12/19</p></td>
<td valign='top'><p>TBA-TBA</p></td>
<td valign='top'><p>$15</p></td>
</tr>
<tr>
<td valign='top'><p> </p></td>
<td colspan=13 valign='top'><p>*</p></td>
</tr>
<tr>
<td valign='top'><p> </p></td>
<td colspan=13 valign='top'><p>Non TESOL/AL majors only. For TC degree students only.</p></td>
</tr>
</tbody>
<tbody class=dotted2>
<tr>
<td valign='top'><p><A HREF="JavaScript:windowOpen('http://128.59.202.34/prometheus/tccoursesyl/course.cfm?enter_crn=20030930292')" onMouseOver="window.status=''; return true" onMouseOut="window.status=''; return true">30292</a></p></td>
<td valign='top'><p>A&HL</p></td><td valign='top'><p>4005</p></td>
<td valign='top'><p>001</p></td>
<td valign='top'><p>3</p></td>
<td colspan=2 valign='top'><p>05:10 pm-06:50 pm</p></td>
<td valign='top'><p>T</p></td>
<td valign='top'><p>Semantic Systems & The Lexicon</p></td>
<td valign='top'><p>F Horowitz</p></td>
<td valign='top'><p>09/03-12/19</p></td>
<td valign='top'><p>TBA-TBA</p></td>
<td valign='top'><p>$5</p></td>
</tr>
<tr>
<td valign='top'><p> </p></td>
<td colspan=13 valign='top'><p>*</p></td>
</tr>
<tr>
<td valign='top'><p> </p></td>
<td colspan=13 valign='top'><p>For TC degree students only.</p></td>
</tr>
</tbody>
</table>
-
07-30-2003, 04:32 AM #4
The problem with avoid is its only a suggestion. If the printer drivers run out of room, it will put a page-break in.
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-05-2003, 09:53 AM #5
Too bad! Thanks for your reply, though.
Originally Posted by QuietDean
-
09-08-2003, 04:13 PM #6
page-break-inside
The problem is that although it is defined in the CSS standard, I don't think any browsers currently support it.
Here is a script solution I wrote that works in IE, it is inserted in the window onload event handler. I have a set of paragraph tags that define sections I do not want to break between pages if possible. The 800 figure is kind of an eyeball to see how your screen coordinates correspond to the page.
This way if it detects part of the paragraph falling on a page boundary, it forces a page break before that element.
'***********
'Determine how many vertical document positioning
'units per printed page.
'Iterate through document elements
'Set page-break-before:always when object has
'extended past page edge.
dim pgCnt
dim pgHeight
dim collP
pgHeight = 800
pgCnt = 1
set collP = document.getElementsByTagName("P")
for each p in collP
if p.offsetHeight < pgHeight then
if (p.offsetTop / (pgCnt * pgHeight)) > 1 then
p.style.pageBreakBefore = "always"
pgCnt = pgCnt + 1
end if
end if
next
'***********
Originally Posted by ws_web
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum