Copy link to clipboard
Copied
Hi
I am using RH2020 (update 4) Frameless skin for my project.
I would like to know how can I set the first row of the table as table header. I have created a style for the table but I couldn't find an option to set the first row as the table header. Can this be done in the Table styles or do I need to specify it in the HTML code.
Copy link to clipboard
Copied
Here's the easiest way I've found to create tables with a header row in RH:
The HTML for the table needs to have a <thead></thead> section where the header row lives.
<table class="hdrevenrows">
<thead>
<tr>
<td>Property</td>
<td>Values</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>Property</td>
<td>Values</td>
<td>Description</td>
</tr>
</tbody>
</table>
I hope this helps!
Copy link to clipboard
Copied
You might also find this context menu option handy for tables that already exist.
Copy link to clipboard
Copied
Thank you KarenMinOR
Are you saying that for every table in the project I will need to either add the "th" tag or use the "Convert to Header" option? The project I am handling has got multiple tables.
I was wondering if it is possible to create a Table style wherein I can specify the first row as the Header so that once I apply the style to a table it automatically considers the first row as the Header.
In the style sheet, when we create a new style, it has two tags in it - "th" and "thead". Does this help in creating Tables with Header rows?
Copy link to clipboard
Copied
You can format the first row so it's looks like a header row using the style editor. It won't be a th or thead semantically, but you might not care about that. To format the first row, open your table style in the editor, in the Apply Formatting to field select 'First Row' and define the formatting you want (e.g. shading, bold, etc).
Otherwise, yes, you'll need to convert the first row of cells to th for every table. And I couldn't find a way of inserting thead using the menus, so you'd need to go into code view and enter that manually.
Copy link to clipboard
Copied
I understand that <thead> will be added in an update, also that <th> can be applied to the code but the table code is complex.
________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information
Copy link to clipboard
Copied
Rereading the information I was given, you should be able to apply <thead> in the code as well.
________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information
Copy link to clipboard
Copied
Hi
What does the "Convert to Header" do? I applied it to the first row of my table and in the PDF output the table header did not repeat.
All I did is inserted a table from the top ribbon and applied the "Convert to Header" option to the first row. Did not apply any customised styles. Added multiple rows and then generated a PDF output. But unfortunately the header did not repeat.
This is how I applied the style:
Are there any other steps I need to follow while applying the "Convert to Header" style?
Copy link to clipboard
Copied
Applying TH to the first row simply renders the text to centre aligned bold (the HTML default) unless you have changed the definition in your CSS.
In Word you can set the first row of a table to repeat on page split but that is applied in the document. My site has macros that will run through Word documents and allow you to apply that to all tables or selected tables.
I think right now all you can do is generate to Word and run one of those macros.
I believe Adobe will be looking at THEAD and TH in future updates. I don't know if that will fix the issue in either PDF or Word. Word, for example, is looking for the tables to have the repeat setting applied rather than looking for any HTML tag.
________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information