Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CCS : page-break's

Status
Not open for further replies.

andycape

Programmer
Aug 22, 2003
177
ZA
I have heard 2 diff versions of what page-break-before:auto does,

1. nothing : default printer setting apply.
2. If its before a certain table/object it will force a page break if that table/object dosnt fit on the page.

The 2nd one is what many websites say and this is what I want, but its not working for me.
I dont want page-break-before:always as I dont know how long the document will be, and I have no idea what page-break-before:left or page-break-before:right do ;-), but i dont think they do what i need.

I am using IE 6, as far as I know page breaks should work on IE 5 or later.


example :


<STYLE TYPE=&quot;text/css&quot;>
P.breakhere {page-break-before: auto}
</STYLE>

<stuff>

<!-- here comes the pagebreak -->
<P CLASS=&quot;breakhere&quot;>
<table> stuff in table - if this table is too big to fit on page : PAGEBREAK</table>
 
Ive seen the w3schools explainations , and they say :

page-break-before: auto
Insert a page break before the element if necessary

which is what i want but it dosn't work.
 
Very true, But if you then look at which browsers the various forms of the style attribute work in!


there is a table on the page I linked to headed NN and IE. The numbers in these refer to which browser version it is implemented in, blank indicates &quot;Not at all&quot;.




Chris.

Indifference will be the downfall of mankind, but who cares?
 
so vertually all don't work in IE or NN, what's the point of listing them then if they dont work anywhere? ;-)

thanx, I will have to find a way to count the lines or something :)
 
What not put each &quot;page&quot; in a div tag?

<div id=&quot;page1&quot;> .... </div>
<div id=&quot;page2&quot;> .... </div>

<style>
#page1, #page2 {
border-bottom:2px solid black;
margin-bottom:10px;
}
</style>

----------
I'm willing to trade custom scripts for... [see profile]
 
sorry - ive lost you , how is that going to help ?
 
Well I figured the combined dimensions of a div could be syncronised to the printer pageHeight value which represents paper size.

----------
I'm willing to trade custom scripts for... [see profile]
 
thats very good to know, certainly would help solve my problem, but i'm still lost ;-)

Its not my area , i wouldnt know how to calculate the dimensions of each div. Do you get the figure in centimeters and then compare it to the length of the page ?? (A4)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top