Yvan Daneault wrote:

> I have include the following rule in my stylesheet:
> p {page-break-inside:avoid;}
> but it does not seem to work in most browsers, except Opera.

Yes, that's summarized
http://www.webdevout.net/browser-support-css#css2propsprint
as well as
http://reference.sitepoint.com/css/page-break-inside
(It was actually news to me that any browser supports it.)

In the old times, people wrote about tricks that were purported to prevent 
page breaks, such as wrapping content in a table. However, such tricks seem 
ineffective at least nowadays.

For a paragraph, page breaks could, in theory, be prevented by setting the 
orphans and widows properties to a large value. However, support to them 
seems to be as limited as for page-break-inside.

> Most of my base is on Safari
> 3.0 Mac which claims that Safari has been supporting
> page-break-inside since version 1.3. Well it does not work for me.

It's most probably a documentation error.

> could see one of my problematic pages at the following url:
> http://icgq.net/prof01/fl/bandeaux/01-notions-base/instructions.html
>
> Look at the third paragraph in Section [4]. It breaks before the
> inline image.

I can't see what you mean. I don't see any numbered sections there. Do you 
mean the part with heading "Formats de bandeaux"?  The third <p> element 
there starts with "Flash vous offre aussi la possibilité". On my IE 7, that 
paragraph starts on a new page and is contained in one page. It really 
depends on the browser, its settings, and printer settings (including 
margins and paper size) where page breaks appear.

But as far as I can see, page break prevention won't work even in the simple 
case where you would use it (for a paragraph containing text and images).

Explicit page break requests with CSS work fairly well, and of course they 
often prevent undesired page breaks, but they can cause very poor results 
when the parameters of printing differ substantially from what the author 
expects (e.g., one-liner pages).

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to