1 of 2
1
Divs not printing in page breaks
Posted: 12 November 2006 11:07 AM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2006-11-12

Hi, I’m having this problem where the tables done in divs do print but in page breaks they dont print

Profile
 
 
Posted: 21 August 2007 10:15 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  16
Joined  2007-08-21

You should use a separate stylesheet, only for printing.

Normal style:

<link rel="stylesheet" type="text/css" href="screen.css" media="screen" /> 

Print Style

<link rel="stylesheet" type="text/css" href="print.css" media="print" /> 

Than you can have total control over how you’re prints look (define in the stylesheet)!

Profile
 
 
Posted: 10 November 2009 04:54 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  2
Joined  2009-11-10

Thanks for sharing good tips I try this in my new website its working well here

Profile
 
 
Posted: 02 December 2009 10:22 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  1
Joined  2009-12-01

<div style=“page-break-after:always;”>You can indeed….

This “styling” tells the browser that as soon as that paragraph finishes everything after it should start printing on a new page. We could just as well apply the same rule to, say, all the paragraphs on a page by adding the following to its header:

p {
page-break-after : always;
}

However, it’s is more likely that you will want to apply breaks only after certain elements rather than after every paragraph. That’s why it is probably better to apply the style individually or to a set of elements that you can use selectively like the DIV.


Techstore for | Printing

Profile
 
 
Posted: 03 December 2009 10:19 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  1
Joined  2009-12-03

n almost every browser out there, unless table widths are specified explicitly, all the text in the table needs to be rendered before the browser can figure out how wide to make the various table cells. This means that pages load slowly. Note that using CSS for layout doesn’t necessarily help here, since there’s the same problem if the widths aren’t specified explicity. I’m guilty of this myself.

Profile
 
 
Posted: 26 April 2010 06:16 PM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  9
Joined  2010-04-26

However, it’s is more likely that you will want to apply breaks only after certain elements rather than after every paragraph. That’s why it is probably better to apply the style individually or to a set of elements that you can use selectively like the DIV.paragraph finishes everything after it should start printing on a new page. We could just as well apply the same rule to, say, all the paragraphs on a page by adding the following to its header.
_______________________________
winstrol
Tummy Tuck

Profile
 
 
Posted: 27 April 2010 01:03 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  3
Joined  2010-04-27

As with most CSS attributes, you can access our two stars via JavaScript, by using the properties pageBreakBefore and pageBreakAfter. The obvious advantage of this is the ability to then dynamically assign their values. For example, instead of forcing custom page breaks on your visitors, you can create a script to make this optional. Here I’ll create a checkbox that toggles between slicing the page at the headers (h2) and at the printer’s own discretion (default):

<form name=“myform”>
<input type=“checkbox” name=“mybox” onClick=“breakeveryheader()”>
</form>


function breakeveryheader(){
var thestyle=(document.forms.myform.mybox.checked)? “always” : “auto”
for (i=0; i<document.getElementsByTagName(“H2”).length; i++)
document.getElementsByTagName(“H2”).style.pageBreakBefore=thestyle
}

______________________________________________________
Real Estate Nashville
Houses for sale

Profile
 
 
Posted: 04 May 2010 09:29 AM   [ Ignore ]   [ # 7 ]
Newbie
Rank
Total Posts:  4
Joined  2010-05-04

It might be attribute problesm. Pls check the attributes
_____________________________
export sourcing firm
womens western jeans

Profile
 
 
Posted: 01 June 2010 02:37 PM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  3
Joined  2010-06-01

you might have to check the attributes

Profile
 
 
Posted: 14 June 2010 05:23 PM   [ Ignore ]   [ # 9 ]
Newbie
Rank
Total Posts:  6
Joined  2009-11-06

same problem with me :(


_____________
World Travel Guide | Left-Handed Stuff

Profile
 
 
Posted: 03 October 2010 10:46 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  2
Joined  2010-10-03

I solved my problem, good topic
——————————————————-
eurosportbet

Profile
 
 
Posted: 13 January 2011 05:54 PM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  1
Joined  2011-01-13
Bob Walsh - 02 December 2009 10:22 AM

<div style=“page-break-after:always;”>You can indeed….

This “styling” tells the browser that as soon as that paragraph finishes everything after it should start printing on a new page. We could just as well apply the same rule to, say, all the paragraphs on a page by adding the following to its header:

p {
page-break-after : always;
}

However, it’s is more likely that you will want to apply breaks only after certain elements rather than after every paragraph. That’s why it is probably better to apply the style individually or to a set of elements that you can use selectively like the DIV.

]

I use that for my blog

body{
  background: /image/etoro/avafx  ;
repeat X }


I tried this CSS style and it works bu with the CSS 3 you should not use it anymore

Profile
 
 
Posted: 18 January 2011 10:49 PM   [ Ignore ]   [ # 12 ]
Jr. Member
RankRank
Total Posts:  44
Joined  2010-10-13

Browsers are rather horrible in the printing department, so you have to hand them some crutches

Profile
 
 
Posted: 21 January 2011 02:24 PM   [ Ignore ]   [ # 13 ]
Newbie
Rank
Total Posts:  23
Joined  2011-01-06

I have the same problem bu no solution yet. page-break-inside does not work on browsers but Opera.

Profile
 
 
Posted: 01 February 2011 01:07 PM   [ Ignore ]   [ # 14 ]
Newbie
Rank
Total Posts:  12
Joined  2011-01-17

With CSS (level 2), the grip webmasters have over their webpages extends to the printer.

Profile
 
 
Posted: 01 February 2011 04:08 PM   [ Ignore ]   [ # 15 ]
Newbie
Rank
Total Posts:  15
Joined  2011-01-17

Let’s take an example of a Notes form where using this method might be more than just for the sake of it.

Profile
 
 
   
1 of 2
1