Table won't break across pages
Table won't break across pages
Hi all,
I think I've defined my tables so that they won't put a page break in a row by going into Advanced on the row and selected "Avoid" for inside, but leaving Before and After as "Default."
Now what I've found is that if the table will not all fit on the page it will pop to the top of the next page (even if it then breaks across two pages anyway).
To try to bring it back, I've found that if I put a blank <p> between the start of the table and whatever precedes it (caption or heading) it will start where it should and break normally. But I'd rather not have that gap there. (I should note that captions and headings are defined to be kept with whatever follows - just in case that's what's causing this problem.)
I'm sure it's something simple, but what am I doing wrong? Any thoughts?
Thanks,
Kath
I think I've defined my tables so that they won't put a page break in a row by going into Advanced on the row and selected "Avoid" for inside, but leaving Before and After as "Default."
Now what I've found is that if the table will not all fit on the page it will pop to the top of the next page (even if it then breaks across two pages anyway).
To try to bring it back, I've found that if I put a blank <p> between the start of the table and whatever precedes it (caption or heading) it will start where it should and break normally. But I'd rather not have that gap there. (I should note that captions and headings are defined to be kept with whatever follows - just in case that's what's causing this problem.)
I'm sure it's something simple, but what am I doing wrong? Any thoughts?
Thanks,
Kath
-
ajturnersurrey
- Sr. Propeller Head
- Posts: 348
- Joined: Fri Nov 05, 2010 3:30 am
Re: Table won't break across pages
A vote of sympathy rather than a solution to your problem. I have been suffering the same thing too, but I haven't yet come up with a satisfactory way round either! The fact that I am importing my table from another Flare project where it serves another purpose further restricts my options for tweaks.
Re: Table won't break across pages
Thanks for the sympathy ajturnersurrey.
By the lack of response is this too easy to fix or too hard?
One additional bit of info. I tried defining my table style to have "default" for all the ways you could have page breaks. This made no difference. The table still jumps to the next page.
I'm using Flare 7.2, if that makes a difference.
Thanks,
Kath
By the lack of response is this too easy to fix or too hard?
One additional bit of info. I tried defining my table style to have "default" for all the ways you could have page breaks. This made no difference. The table still jumps to the next page.
I'm using Flare 7.2, if that makes a difference.
Thanks,
Kath
Re: Table won't break across pages
What attributes have you specified for your table tag? If you have a large margin-top attribute defined for the table tag, then it may be that it has to move the table to the next page to honor that spacing. If you insert a blank paragraph before the table and your paragraph tag has a margin-bottom value, then the two values aren't added together but rather the larger of the two wins. It could be that when you put the blank paragraph before the table, it changes how the table behaves because of the paragraph. You might want to make sure your table tag has margin-top and padding-top set to 0 (instead of just default or "not set").
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table won't break across pages
Thanks for the suggestion, Lisa.
I tried changing it to 0 (it was "not set") but this didn't make a change.
I'm becoming more convinced that it has something to do with the paragraph preceding the table, rather than the table itself. If that paragraph is a caption or a heading (both defined to avoid page breaks after) then we start on a new page. It's almost as though it doesn't see the table coming after it, and so avoids the page break by starting on a new page.
(Just an aside: I like the Word attribute "Keep with Next" better, because it implies a maintaining a group rather avoiding a break. However, it's probably semantics since they do essentially serve the same purpose.)
I suppose one workaround would be to define a super small P style to put in between the caption and the table, but it's still a bit irksome.
Thanks,
Kath
I tried changing it to 0 (it was "not set") but this didn't make a change.
I'm becoming more convinced that it has something to do with the paragraph preceding the table, rather than the table itself. If that paragraph is a caption or a heading (both defined to avoid page breaks after) then we start on a new page. It's almost as though it doesn't see the table coming after it, and so avoids the page break by starting on a new page.
(Just an aside: I like the Word attribute "Keep with Next" better, because it implies a maintaining a group rather avoiding a break. However, it's probably semantics since they do essentially serve the same purpose.)
I suppose one workaround would be to define a super small P style to put in between the caption and the table, but it's still a bit irksome.
Thanks,
Kath
Re: Table won't break across pages
I have been pulling my hair out over this one for awhile now and was able to solve it today by moving to Table Styles instead of using individual classes. I had been formatting my tables by tagging classes to the individual table elements (th, tr) and a class on the table itself. All of these were in the primary stylesheet. No matter what I did with page breaks, margins, or anything else my long table would break before the table and then break across two pages due to length, just as HiyaKath described above.
I dropped all of the classes entirely from the table in its source snippet and built a table style using the Table Style Editor and then applied my table style, breaks work just fine. My table now starts on the desired page immediately under the lead in <p> element and the breaks at the end when it runs out of paper.
The table style editor seems to have much more robust breaking controls than the regular stylesheet editor in case of further customization need.
For some reason when I did this I had to go to each table and remove a "margin: 0px" style to stop it from overriding my table style. I don't know if that will happen to anyone else.
Hope this helps!
I dropped all of the classes entirely from the table in its source snippet and built a table style using the Table Style Editor and then applied my table style, breaks work just fine. My table now starts on the desired page immediately under the lead in <p> element and the breaks at the end when it runs out of paper.
The table style editor seems to have much more robust breaking controls than the regular stylesheet editor in case of further customization need.
For some reason when I did this I had to go to each table and remove a "margin: 0px" style to stop it from overriding my table style. I don't know if that will happen to anyone else.
Hope this helps!
Re: Table won't break across pages
Thanks for the input, Cwestpha, but I'm not sure I understand how to apply your suggestion.
The tables I'm working with are defined as table styles and inserted as such. Most of them use only the td tag for the text in the cells. Is there another way of defining them besides in Resources-->Table Styles?
Sorry for being dense. Maybe it was the unexpected 2-hour commute I had this morning.
Thanks,
Kath
The tables I'm working with are defined as table styles and inserted as such. Most of them use only the td tag for the text in the cells. Is there another way of defining them besides in Resources-->Table Styles?
Sorry for being dense. Maybe it was the unexpected 2-hour commute I had this morning.
Thanks,
Kath
Re: Table won't break across pages
Nope that is how I created the table style. I wasn't doing that before, I was just applying classes to each table, tr, and th element and defining CSS rules for those classes in my default style sheet. Since you are already using the table style then my solution may not work for you.
Do you apply element level changes to the table in addition to using the table style? Also, if you recreate the table by copying and pasting to a new table and just apply the table style from scratch does it still break incorrectly? I don't really have a solution here, I am just wondering what I got rid of by making a new table style that is still causing a problem for you.
Do you apply element level changes to the table in addition to using the table style? Also, if you recreate the table by copying and pasting to a new table and just apply the table style from scratch does it still break incorrectly? I don't really have a solution here, I am just wondering what I got rid of by making a new table style that is still causing a problem for you.
Re: Table won't break across pages
Darn, I was hoping I just didn't understand what you meant.
I'm going to experiment with different table styles to see if I can find one that works and then compare to see exactly what is different.
I'll report back if I'm successful.
Thanks,
Kath
I'm going to experiment with different table styles to see if I can find one that works and then compare to see exactly what is different.
I'll report back if I'm successful.
Thanks,
Kath
Re: Table won't break across pages
Keep in mind that both the main topic stylesheet and the table stylesheet are referenced in each topic (well, the topic stylesheet is in each topic; the table stylesheet is only in those topics that have a table that uses a table stylesheet). I haven't checked in v8, but generally the table stylesheet is referenced last which means its styles override the styles in the topic stylesheet, but only for attributes that it expressly states. In other words, the table you see in the output can be getting its style definitions from both the table stylesheet and the topic stylesheet, depending on what is defined where. So switching to a table stylesheet won't necessarily take care of the problem if the problem is being inherited from the topic stylesheet.HiyaKath wrote:The tables I'm working with are defined as table styles and inserted as such. Most of them use only the td tag for the text in the cells. Is there another way of defining them besides in Resources-->Table Styles?
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table won't break across pages
I'm having the same problem, and I'm pretty sure it's caused by the Avoid Page Break After setting on the heading and <p> tag preceding the table. One solution is to force a page break before the preceding heading and REMOVE the Avoid Page Break After on the <p> tag before the table. For some reason, the table then stays with the preceding heading and <p> as you would expect and breaks naturally. It's not ideal, but it looks better than the break between the table and the the heading.
-
nickatwork
- Sr. Propeller Head
- Posts: 457
- Joined: Thu Sep 16, 2010 6:31 am
- Location: London
Re: Table won't break across pages
Pretty sure that you should infact be setting the page break settings on the row, not the P class in the table.
Re: Table won't break across pages
I was able to solve this problem by setting the table caption to avoid page breaks after and the table to avoid page breaks before and inside (in TableStyle Editor > Advanced). Now, the caption now appears above the table on a new page if the table would break.
I vaguely remember having this problem before, however, and don't remember whether I could find a fix or not. Maybe this was something they fixed in version 8?
I vaguely remember having this problem before, however, and don't remember whether I could find a fix or not. Maybe this was something they fixed in version 8?