RE: [WSG] Printed web pages with text cut in half at the bottom o f the page?

2005-08-11 Thread Drake, Ted C.
I saw an interesting snippet, I think it was on the W3C site. It was a
conditional comment that kept a section from being cropped by a printed
page. I was just searching trough my old files and can't find it right now.

If I remember correctly, it was a rule that said 
@print... #importantsection {avoid break within this block;}

Obviously the above is a very rough sketch of the actual rule.  Does anyone
else know of this?  I thought it was a useful idea and tried it on a page, I
just can't remember which page.:(

Ted
www.tdrake.net

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of James Denholm-Price
Sent: Thursday, August 11, 2005 2:58 AM
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Printed web pages with text cut in half at the bottom of
the page?

Hi Bennie  [EMAIL PROTECTED],

On 8/11/05, Bennie, Jack [EMAIL PROTECTED] wrote:
 Has anyone encountered the problem, when printing a web page, where the
last
 line of text is being cut in half?
  By this I mean that the top half of the letters print on one page and the
 bottom half print on the next. 
 
 Any suggestions as to what might be causing this and how to stop it? I've
 run some tests and it doesn't seem to be browser specific...

Can you quote an example?

According to discussion on css-d (e.g. [1]) it's often related to
floated elements -- it seems best to simplify your layout as much as
possible using a print style sheet to help current browsers to print
sensibly. See [2] for some more info.

HTH,
  James

[1] http://archivist.incutio.com/viewlist/css-discuss/60217
[2] http://css-discuss.incutio.com/?page=PrintStylesheets
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



RE: [WSG] Printed web pages with text cut in half at the bottom o f the page?

2005-08-11 Thread Patrick Lauke
 Drake, Ted C. 

 I saw an interesting snippet, I think it was on the W3C site. It was a
 conditional comment that kept a section from being cropped by 
 a printed
 page. I was just searching trough my old files and can't find 
 it right now.
 
 If I remember correctly, it was a rule that said 
 @print... #importantsection {avoid break within this block;}

The selector would depend on the structure of the actual HTML, but
assuming you have something like

body
...
div id=content
...
div
/div
...
div
/div
...
/div
...
/body

and you wanted to avoid breaks within the child divs of #content, you
could probably have something like

#content div { page-break-inside: avoid; }

or, more generally if you want to avoid any breaks of any elements (which
could be dangerous, depending on how long the individual elements are)

#content * { page-break-inside: avoid; }

Not tested this, by the way...so I may be talking absolute bobbins ;)

P
__
Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
__
Web Standards Project (WaSP) Accessibility Task Force
http://webstandards.org/
__
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



RE: [WSG] Printed web pages with text cut in half at the bottom o f the page?

2005-08-11 Thread Drake, Ted C.
Hi Patrick
That is exactly what I was thinking of. Do you know what the support is for
this statement?

I was thinking of using it to keep a legal disclaimer from being split
between two pages.  I've just had other things to deal with before working
with it more.

Does this answer the original question about cropping?

Ted



 Drake, Ted C. 

 I saw an interesting snippet, I think it was on the W3C site. It was a
 conditional comment that kept a section from being cropped by 
 a printed
 page. I was just searching trough my old files and can't find 
 it right now.
 
 If I remember correctly, it was a rule that said 
 @print... #importantsection {avoid break within this block;}

The selector would depend on the structure of the actual HTML, but
assuming you have something like

body
...
div id=content
...
div
/div
...
div
/div
...
/div
...
/body

and you wanted to avoid breaks within the child divs of #content, you
could probably have something like

#content div { page-break-inside: avoid; }

or, more generally if you want to avoid any breaks of any elements (which
could be dangerous, depending on how long the individual elements are)

#content * { page-break-inside: avoid; }

Not tested this, by the way...so I may be talking absolute bobbins ;)

P
__
Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
__
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Printed web pages with text cut in half at the bottom o f the page?

2005-08-11 Thread Andrew Krespanis
 That is exactly what I was thinking of. Do you know what the support is for
 this statement?

Support for page break control via CSS is pathetic, especially if your
trying to set orphan/widow rules.

Spec: http://www.w3.org/TR/REC-CSS2/page.html

-Andrew
--
http://leftjustified.net/
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**