I'm a big fan of Firefox, the Mozilla browser that seems to be gaining
some market share here and there.
But there's a printing problem: Firefox wants to insert a page break
after the caption tag in the generated HTML code. This produces an
ugly printout, lots of wasted paper, etc. Looks fine on the screen,
however.
There is a printing work-around, which is to use the Firefox plugin IE
Tab, which converts a page into IE format, and then print from that.
But it's a workaround, and not very smooth.
I wonder if we really need the <caption> tag? Firefox is pretty
famous for misinterpreting this tag, and while many faithful MS IE
people will have no problem, it wrecks the printout for us Firefox folks.
I'm pretty sure that the tag is being used properly, (supposed to fall
immediately after the <table> tag) but somehow the printing doesn't go
properly.
Code is here:
<h3 id="title">Final Results</h3>
<li><a href="#m242">M242 Class</a></li>
<h3 id="m242">M242 Class</h3>
<table cellspacing="0" cellpadding="0" border="0">
[ form feed occurs here]
<caption>Sailed:5, Discards:1, To count:4, Entries:29, Scoring
system:Appendix A</caption>
Appreciate comments and suggestions, as always.
jrc
John Culter wrote:
I'm a big fan of Firefox, the Mozilla browser that seems to be gaining
some market share here and there.
But there's a printing problem: Firefox wants to insert a page break
after the caption tag in the generated HTML code. This produces an
ugly printout, lots of wasted paper, etc. Looks fine on the screen,
however.
<snip>
Code is here:
<h3 id="title">Final Results</h3>
<li><a href="#m242">M242 Class</a></li>
<h3 id="m242">M242 Class</h3>
<table cellspacing="0" cellpadding="0" border="0">
[ form feed occurs here]
<caption>Sailed:5, Discards:1, To count:4, Entries:29, Scoring
system:Appendix A</caption>
Appreciate comments and suggestions, as always.
Have you tired tweaking the css file? There are css instructions such as:
page-break-after: avoid;
page-break-inside: avoid;
page-break-before: avoid;
It seems to me that splitting the table is worse than splitting the
header - so the table should have page-break-inside: avoid; set in the
css, while the caption should have page break-before: avoid; set.
I'm trying to find the problem, for me there is no difference, see attached files, from an example you can find in Sail Wave
Firefox is version 3.0.1 and IE is 7.0.6001.18000
Surprizing a difference of file size, using the same virtual Printer PDFcreator;..
Phil
···
----- Original Message ----- From: "John Culter" <jrculter@medi.net>
To: <sailwave@yahoogroups.com>
Sent: Monday, September 22, 2008 8:53 PM
Subject: [sailwave] Firefox caption tag problem
I'm a big fan of Firefox, the Mozilla browser that seems to be gaining
some market share here and there.
But there's a printing problem: Firefox wants to insert a page break
after the caption tag in the generated HTML code. This produces an
ugly printout, lots of wasted paper, etc. Looks fine on the screen,
however.
There is a printing work-around, which is to use the Firefox plugin IE
Tab, which converts a page into IE format, and then print from that.
But it's a workaround, and not very smooth.
I wonder if we really need the <caption> tag? Firefox is pretty
famous for misinterpreting this tag, and while many faithful MS IE
people will have no problem, it wrecks the printout for us Firefox folks.
I'm pretty sure that the tag is being used properly, (supposed to fall
immediately after the <table> tag) but somehow the printing doesn't go
properly.
Code is here:
<h3 id="title">Final Results</h3>
<li><a href="#m242">M242 Class</a></li>
<h3 id="m242">M242 Class</h3>
<table cellspacing="0" cellpadding="0" border="0">
[ form feed occurs here]
<caption>Sailed:5, Discards:1, To count:4, Entries:29, Scoring
system:Appendix A</caption>
Appreciate comments and suggestions, as always.
jrc
------------------------------------
-!- http://www.yachtsandyachting.com/ -!- http://www.sailing.org/ -!- http://www.sailwave.com/ -!-
Latest versions of sailwave can be downloaded from the 'files' section at
http://groups.yahoo.com/group/sailwave/
On-Line Sailwave help...
http://sailwave.com/help/HTML/
Convert to daily digest of emails send blank email to:
sailwave-digest@yahoogroups.comYahoo! Groups Links
My examples were working properly, probably because the table was not long enough.
Your suggestion seems good, personally I think it is better to split the table unless there are widow-lines (one or two) on the next page...
I suggest Colin to include this correction as soon as possiblein the style> tag...
Phil
···
----- Original Message ----- From: "Calum Polwart" <yahoo@wittongilbert.free-online.co.uk>
To: <sailwave@yahoogroups.com>
Sent: Monday, September 22, 2008 9:27 PM
Subject: Re: [sailwave] Firefox caption tag problem
John Culter wrote:
I'm a big fan of Firefox, the Mozilla browser that seems to be gaining
some market share here and there.
But there's a printing problem: Firefox wants to insert a page break
after the caption tag in the generated HTML code. This produces an
ugly printout, lots of wasted paper, etc. Looks fine on the screen,
however.
<snip>
Code is here:
<h3 id="title">Final Results</h3>
<li><a href="#m242">M242 Class</a></li>
<h3 id="m242">M242 Class</h3>
<table cellspacing="0" cellpadding="0" border="0">
[ form feed occurs here]
<caption>Sailed:5, Discards:1, To count:4, Entries:29, Scoring
system:Appendix A</caption>
Appreciate comments and suggestions, as always.
Have you tired tweaking the css file? There are css instructions such as:
page-break-after: avoid;
page-break-inside: avoid;
page-break-before: avoid;
It seems to me that splitting the table is worse than splitting the
header - so the table should have page-break-inside: avoid; set in the
css, while the caption should have page break-before: avoid; set.
------------------------------------
-!- http://www.yachtsandyachting.com/ -!- http://www.sailing.org/ -!- http://www.sailwave.com/ -!-
Latest versions of sailwave can be downloaded from the 'files' section at
http://groups.yahoo.com/group/sailwave/
On-Line Sailwave help...
http://sailwave.com/help/HTML/
Convert to daily digest of emails send blank email to:
sailwave-digest@yahoogroups.comYahoo! Groups Links
For those who didn’t understand the problem, I’ve duplicated the last rows of the table, until the table exceeds one page length, there is indeed one single line with the class on page 2, further the “sailed…” caption appears on page 3 on top of the table.
Proposed action: in the section, change as follows:
caption {padding-left: 5px; text-align: center; border: 0; font-weight: bold; page-break-before: avoid; page-break-after: avoid;}
Source: http://www.w3.org/TR/CSS21/page.html#page-break-props
table {page-break-before: avoid;}
Now I tested it and it DID NOT work!
Further I tested the style
Note that the style of the caption is also defined as “align: left” and the caption is centered…
and it didn’t work either…
so… I can only suggest the following:
- Abandon the tag
- define a class ".caption " in the styles as (the page-break styles are held), why not?:
.caption { text-align: left; margin: auto; font-size: 1em; border-collapse: collapse; border: 1px #fff solid; padding-left: 5px; text-align: center; border: 0; font-weight: bold; page-break-before: avoid; page-break-after: avoid;}
- replace and in the body by
and
- bring this line before the
tag
AND IT IS TESTED AND IT WORKS! Hurrah! (see last version), modified html file also attached
Phil
blwB042.htm (16.3 KB)
···
----- Original Message -----
From:
Colin Jenkins
To: sailwave@yahoogroups.com
Sent: Tuesday, September 23, 2008 6:07 PM
Subject: Re: [sailwave] Firefox caption tag problem
I can do that - what’s the correction though, so it works in both browsers …?
cj
Philippe DE TROY wrote:
My examples were working properly, probably because the table was not long enough.
Your suggestion seems good, personally I think it is better to split the table unless there are widow-lines (one or two) on the next page...
I suggest Colin to include this correction as soon as possiblein the style> tag...
Phil
----- Original Message ----- From: "Calum Polwart" <yahoo@wittongilbert.free-online.co.uk>
To: <sailwave@yahoogroups.com>
Sent: Monday, September 22, 2008 9:27 PM
Subject: Re: [sailwave] Firefox caption tag problem
John Culter wrote:
I'm a big fan of Firefox, the Mozilla browser that seems to be gaining
some market share here and there.
But there's a printing problem: Firefox wants to insert a page break
after the caption tag in the generated HTML code. This produces an
ugly printout, lots of wasted paper, etc. Looks fine on the screen,
however.
<snip>
Code is here:
<h3 id="title">Final Results</h3>
<li><a href="#m242">M242 Class</a></li>
<h3 id="m242">M242 Class</h3>
<table cellspacing="0" cellpadding="0" border="0">
[ form feed occurs here]
<caption>Sailed:5, Discards:1, To count:4, Entries:29, Scoring
system:Appendix A</caption>
Appreciate comments and suggestions, as always.
Have you tired tweaking the css file? There are css instructions such as:
page-break-after: avoid;
page-break-inside: avoid;
page-break-before: avoid;
It seems to me that splitting the table is worse than splitting the
header - so the table should have page-break-inside: avoid; set in the
css, while the caption should have page break-before: avoid; set.
------------------------------------
-!- [http://www.yachtsandyachting.com/](http://www.yachtsandyachting.com/) -!- [http://www.sailing.org/](http://www.sailing.org/) -!- [http://www.sailwave.com/](http://www.sailwave.com/) -!-
Latest versions of sailwave can be downloaded from the 'files' section at
[http://groups.yahoo.com/group/sailwave/](http://groups.yahoo.com/group/sailwave/)
On-Line Sailwave help...
[http://sailwave.com/help/HTML/](http://sailwave.com/help/HTML/)
Convert to daily digest of emails send blank email to:
sailwave-digest@yahoogroups.comYahoo! Groups Links
------------------------------------
-!- [http://www.yachtsandyachting.com/](http://www.yachtsandyachting.com/) -!- [http://www.sailing.org/](http://www.sailing.org/) -!- [http://www.sailwave.com/](http://www.sailwave.com/) -!-
Latest versions of sailwave can be downloaded from the 'files' section at
[http://groups.yahoo.com/group/sailwave/](http://groups.yahoo.com/group/sailwave/)
On-Line Sailwave help...
[http://sailwave.com/help/HTML/](http://sailwave.com/help/HTML/)
Convert to daily digest of emails send blank email to:
sailwave-digest@yahoogroups.comYahoo
! Groups Links
<*> To visit your group on the web, go to:
[http://groups.yahoo.com/group/sailwave/](http://groups.yahoo.com/group/sailwave/)
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
[http://groups.yahoo.com/group/sailwave/join](http://groups.yahoo.com/group/sailwave/join)
(Yahoo! ID required)
<*> To change settings via email:
mailto:sailwave-digest@yahoogroups.com
mailto:sailwave-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
sailwave-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
[http://docs.yahoo.com/info/terms/](http://docs.yahoo.com/info/terms/)
---
No virus found in this incoming message.
Checked by AVG - [http://www.avg.com](http://www.avg.com)
Version: 8.0.169 / Virus Database: 270.7.1/1686 - Release Date: 23/09/2008 07:38
Colin,
One of Phillippe’s suggestion was to skip the tag.
On my machine, when I replace the line with
tags, things are good.
Problem here:
M242 Class
**Sailed:5, Discards:1, To count:4, Entries:29, Scoring system:Appendix A**
This works:
M242 Class
**Sailed:5, Discards:1, To count:4, Entries:29, Scoring system:Appendix A
**
In terms of simplicity, this might suit you. The line seems to float nicely at the top of the table. Of course, it might not pass the W3C test, but it does seem to work okay.
Thanks for all this,
jrc