Re: [css-d] page-break-inside:avoid; not working

2009-04-11 Thread Jukka K. Korpela
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  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/


Re: [css-d] page-break-inside:avoid; not working

2009-04-10 Thread Michael Adams
On Fri, 10 Apr 2009 16:43:27 -0400
Came this utterance formulated by Yvan Daneault to my mailbox:

> I am a web-design teacher who's in the process of putting his
> documentation online, but I also want my students to occasionnally
> print the pages. The situation is as follows:
> 
> I do not want paragraphs to be broken by a page break.
> 
> 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. I love
> Opera but my students are not using it. Most of my base is on Safari
> 3.0 Mac which claims that Safari has been supporting page-break-inside
> since version 1.3.

Opera is the only one with this support AFAIK:
http://reference.sitepoint.com/css/page-break-inside#compatibilitysection

If you are teaching web design you should be telling students to look at
their work in as many different browsers as possible. You can then
advise them that Opera has the best support for printing. To me it
doesn't matter as i normally copy and paste to a word processor before
printing anyway, even on print ready sites, to avoid two lines on a page
if i can.

-- 
Michael

All shall be well, and all shall be well, and all manner of things shall
be well

 - Julian of Norwich 1342 - 1416
__
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/


[css-d] page-break-inside:avoid; not working

2009-04-10 Thread Yvan Daneault
I am a web-design teacher who's in the process of putting his documentation
online, but I also want my students to occasionnally print the pages.
The situation is as follows:

I do not want paragraphs to be broken by a page break.

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. I love Opera
but my students are not using it. 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. You can see the spec at this url:
http://developer.apple.com/documentation/appleapplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266-PagedMedia

You 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.

Thanks

Yvan
__
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/