Table Header Styles are not being applied--very frustrated
Table Header Styles are not being applied--very frustrated
Does anyone have any insight as to what could be wrong here--I set a style for headers in a table style sheet to be light gray. Sounds simple right? Well no matter what I try, the table style does not produce a table with a light gray header. I am really banging my head against the wall on this one. Am I missing something totally obvious?
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Table Header Styles are not being applied--very frustrat
After creating a table and applying the table style, be sure to go into the table's Table Properties and set the number of header rows to something greater than 0, which is the default.
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Table Header Styles are not being applied--very frustrat
Thanks Nita, that was the obvious thing I was missing for the headers, clearly. Tables in Flare are frustrating me to no end, in the Print medium anyway. I suppose I do not have a great understanding of how to set options like widows and orphans and page breaks so that I get them to do what I want, especially with tables.
-
- Senior Propellus Maximus
- Posts: 2632
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Table Header Styles are not being applied--very frustrat
I also find it useful to produce a nice, neat, empty table and save it as a snippet, so that I can just insert the snippet and convert it to text, rather than having to insert the table, apply the table stylesheet, open Properties, add header rows...
Think it was Nita who suggested it, and it's been a real boon to productivity.
Think it was Nita who suggested it, and it's been a real boon to productivity.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
- Senior Propellus Maximus
- Posts: 3669
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Table Header Styles are not being applied--very frustrat
Glad we got you squared away. Remember that a table stylesheet merely defines styles that can be applied to a table. It doesn't have anything to do with the structure of a given table, with how many header rows it might have or how many footer rows it might have.
Nita
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Re: Table Header Styles are not being applied--very frustrat
Out of interest, has anybody found a reliable way of controlling these via CSS. I ended up having to write a post-publishing macro for the Word outputs in order to prevent table rows from breaking across pages and to ensure that table headers were not orphaned.CoolLime wrote:Thanks Nita, that was the obvious thing I was missing for the headers, clearly. Tables in Flare are frustrating me to no end, in the Print medium anyway. I suppose I do not have a great understanding of how to set options like widows and orphans and page breaks so that I get them to do what I want, especially with tables.
"In an ideal world, software should be simple, well designed, and completely intuitive to end users. In the real world, good documentation is king."
Re: Table Header Styles are not being applied--very frustrat
I would love to know who has these aspects of tables under control in the Print medium, period...I find the interface, and possibly even the documentation, related to tables in Flare is something that they should seriously look at revamping.
Re: Table Header Styles are not being applied--very frustrat
Code: Select all
tr
{
page-break-inside: avoid;
}
th
{
page-break-after: avoid;
}
-
- Propeller Head
- Posts: 58
- Joined: Thu Mar 23, 2017 12:23 pm
Re: Table Header Styles are not being applied--very frustrat
Did that work for you? page-break-after works for me on rows (tr), but not cells (th or td). Is this expected?devjoe wrote:Code: Select all
tr { page-break-inside: avoid; } th { page-break-after: avoid; }
I can only prevent orphaned headers by creating a tr.header class, but that's not attractive to have to retrofit back into existing documentation.
-
- Propeller Head
- Posts: 58
- Joined: Thu Mar 23, 2017 12:23 pm
Re: Table Header Styles are not being applied--very frustrat
Actually, I might have found a better solution. Originally, our tables were structured like this, using <th> for headers and <td> for data rows:
I found that when I specifically classified the table contents as header and body with <thead> and <tbody>:
the behavior was MUCH better. Headers were no longer orphaned, table row orphan/widow support worked, and table headers were repeated after page breaks. I ended up only needing this content change, with no changes to the style sheets.
Code: Select all
<table>
<tr><th>Header1</th><th>Header2</th></tr>
<tr><th>Header3</th><th>Header4</th></tr>
<tr><td>Data1</td><td>Data2</td></tr>
<tr><td>Data3</td><td>Data4</td></tr>
</table>
Code: Select all
<table>
<thead>
<tr><th>Header1</th><th>Header2</th></tr>
<tr><th>Header3</th><th>Header4</th></tr>
</thead>
<tbody>
<tr><td>Data1</td><td>Data2</td></tr>
<tr><td>Data3</td><td>Data4</td></tr>
</tbody>
</table>
Re: Table Header Styles are not being applied--very frustrat
It seemed to work for me. I have a table in my PDF output which has a header that would have been orphaned if not for this. I don't know if there are other differences, such as the use or lack thereof of thead tags, which affect this.